Train function feed forward part is not working
Closed this issue · 1 comments
qt22 commented
Something is wrong with the feed forward code in the first part of the neural network training function. This could be the reason why all partial derivatives between weight and neuron is 0
I will work on this after implementing chain rule calculations.
### do feed forward for all layers one by ones
for i in range(1, len(self.network)):
# start with 2nd layer (the 1st hidden layer)
layer = self.network[i]
for neuron in layer:
neuron = self.feed_forward(neuron, image)
# update image to value of the neuron from ones layer before
new_image = []
for n in range(len(layer)):
new_image.append(layer[n].value)
image = new_image
qt22 commented
Weight issue fixed by changing the weight upper bound to 0.001
weights = np.random.uniform(low=0.0, high=0.001, size=weight_size)