0

please help me figure out why the matrices dont line up in certain cases

I have a neural network that only works when I fire each neuron by my own. When I try firing it running the net automatically, despite setting identical parameters to ones I used previously, it says it can not line up the matrices. https://code.sololearn.com/coNseV8P4d9X/?ref=app https://code.sololearn.com/coNseV8P4d9X/?ref=app https://code.sololearn.com/coNseV8P4d9X/?ref=app

11th Aug 2018, 9:49 AM
hide on bush
hide on bush - avatar
2 Answers
+ 3
I've inserted lines that print debug strings at a couple of spots: 1. print self.input in Neuron.__init__ 2. print value and self.weights in Neuron.fire, just before self.activation Immediately different between your two methods, in method 2: The two Neuron objects sent-in-one-list are missing. Probably due to the above, the final value and self.weights are [None] and [] respectively. https://code.sololearn.com/c87ogSkAhFYV/?ref=app Since I'm providing a description, I'll keep the debug code around for a little while, then delete it.
15th Aug 2018, 1:17 AM
Kirk Schafer
Kirk Schafer - avatar
0
that.was.amazing.
15th Aug 2018, 7:53 AM
hide on bush
hide on bush - avatar