I've found that you are using sigmoid_prime function in network.py and network2.py to calculate backpropagation. But it is not necessary.
You had calculated activation list in feedforward pass. sigmoid_prime is the derivative of sigmoid function, which is equal to activation * (1 - activation).
You have no need to repeated calculate this sigmoid derivative function, which is really what old-backpropa paper suggest, just one feedforward pass, and a backward pass.
I've found that you are using
sigmoid_prime
function innetwork.py
andnetwork2.py
to calculate backpropagation. But it is not necessary.You had calculated activation list in feedforward pass.
sigmoid_prime
is the derivative of sigmoid function, which is equal toactivation * (1 - activation)
.You have no need to repeated calculate this sigmoid derivative function, which is really what old-backpropa paper suggest, just one feedforward pass, and a backward pass.