Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No backward in the feature extraction network #509

Closed
wants to merge 1 commit into from
Closed

No backward in the feature extraction network #509

wants to merge 1 commit into from

Conversation

kloudkl
Copy link
Contributor

@kloudkl kloudkl commented Jun 17, 2014

Because the learning rate is default to be 1 and backward is default to be true (#389), even though the phase is set to Caffe::TEST, the feature extraction network still performs backward propagation unnecessarily.

@kloudkl kloudkl changed the title Feature extraction no backward No backward in the feature extraction network Jun 17, 2014
@sguada
Copy link
Contributor

sguada commented Jun 17, 2014

Although lr=1 the network only perform backward propagation if you call to the backward function. So although the log says the layer needs backward propagation it will not do it at least it is requested.

@Yangqing
Copy link
Member

I second Sergio's comment - it is not necessary to force it. No backward propagation is carried out unless you call backward. There is actually a good research reason to keep non-zero learning rate (albeit a little hacky) - one can examine gradients if s/he wants and that sometimes reveals salient regions in the images.

@Yangqing Yangqing closed this Jun 19, 2014
@Noiredd
Copy link
Member

Noiredd commented Sep 19, 2016

If backward propagation is not explicitly called, are the gradients still being calculated during inference? I'm optimizing a network for inference speed, and for this particular application I'm not interested in backprop - caffe time still includes it in measurements though. Ideally, I'd like to be able to train a network and then disable all unnecessary computations in order to benchmark it. Do I have to modify the entire proto, or is there some known best way to approach this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants