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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章