joelgrus / data-science-from-scratch

code for Data Science From Scratch book
MIT License
8.63k stars 4.5k forks source link

Update the weights in backpropagation after calculating the hidden_deltas? (neuronal_networks.py) #31

Open sebi44 opened 7 years ago

sebi44 commented 7 years ago

I'm new with neuronal-networks. In your example of backpropagation, you update the weights, which are pointing from the hidden to the output layer, immediatly after calculating the output deltas. After that, you calculate the hidden_deltas using the updated weights. In other documentation all the deltas are calculated and after that, the weights of the network were updated. So what is correct?

I tried to calculate all the deltas first, but then the result is not as good as in your version.