caffe学习笔记2:net forward与backward

caffe学习笔记2:Forward and Backward

原网页:http://caffe.berkeleyvision.org/tutorial/forward_backward.html

forward 和backward是网络必要的功能。

net具有forward和backward两个重要功能,是由layer的backward和forward叠加而成的

  • The Net::Forward() and Net::Backward() methods carry out the respective passes while Layer::Forward() and Layer::Backward() compute each step.

  • layer forward backward :Every layer type has forward_{cpu,gpu}() and backward_{cpu,gpu}() methods to compute its steps according to the mode of computation. A layer may only implement CPU or GPU mode due to constraints or convenience.

  • Solver : 1.first calling forward to yield the output and loss
    2. then calling backward to generate the gradient of the model
    3. and then incorporating the gradient into a weight update that attempts to minimize the loss.
    4. Division of labor between the Solver, Net, and Layer keep Caffe modular and open to development

Solver net layer之间的关系保证了caffe的模块性和开放性,
更多细节请看caffe 层的分类

你可能感兴趣的:(caffe,caffe学习笔记)