Skip to content

Caffe:Tour:ForwardBackward

Forward

Simple_logistic_regression_forward.jpg

The forward pass computes the output given the input for inference. In forward Caffe composes the computation of each layer to compute the “function” represented by the model. This pass goes from bottom to top.

Backward

Simple_logistic_regression_backward.jpg

The backward pass computes the gradient given the loss for learning. In backward Caffe reverse-composes the gradient of each layer to compute the gradient of the whole model by automatic differentiation. This is back-propagation. This pass goes from top to bottom.

See also

Favorite site