I'm trying to re-implement Neural Networks in Python. I implemented the cost function and the backpropogation algorithm correctly. I have checked them by executing its Octave equivalent code.
But when I'm trying to use scipy.optimize.fmin_cg function, the iterations take very long time to execute. It exits with warning and gives me an error saying that the desired error rate wasn't acheived.
The same program in Octave executes fine. However, it has its own fmincg function defined.
What am I doing wrong?