pycaffe实例

分享一个很不错的讲解pycaffe的链接
http://christopher5106.github.io/deep/learning/2015/09/04/Deep-learning-tutorial-on-Caffe-Technology.html
注意这里:
Now, it’s time to begin to see if everything works well and to fill the layers in a forward propagation in the net (computation of net.blobs[k].data from input layer until the loss layer) :

solver.net.forward()  # train net
solver.test_nets[0].forward()  # test net (there can be more than one)

For the computation of the gradients (computation of the net.blobs[k].diff and net.params[k][j].diff from the loss layer until input layer) :

solver.net.backward()

To launch one step of the gradient descent, that is a forward propagation, a backward propagation and the update of the net params given the gradients (update of the net.params[k][j].data) :

solver.step(1)

也可以辅助理解的:
https://gist.github.com/FranciscoCanas/844aab52fcff6b1c652a
看看大家的讨论吧:
https://stackoverflow.com/questions/38435984/pycaffe-got-different-gradients-for-each-run-of-net-backward
https://github.com/BVLC/caffe/issues/583

一个很不错的讲解BP的链接:
http://neuralnetworksanddeeplearning.com/chap2.html
根据caffe辅助理解BP
http://blog.csdn.net/mounty_fsc/article/details/51379395

你可能感兴趣的:(caffe学习,python,深度学习)