Skip to content

Comments

solver.cpp: call UpgradeNetAsNeeded() on learned_net in Solver::Restore()#1972

Closed
moskewcz wants to merge 1 commit intoBVLC:masterfrom
moskewcz:upgrade_net_on_resume
Closed

solver.cpp: call UpgradeNetAsNeeded() on learned_net in Solver::Restore()#1972
moskewcz wants to merge 1 commit intoBVLC:masterfrom
moskewcz:upgrade_net_on_resume

Conversation

@moskewcz
Copy link

when resuming training using the --snapshot option, and thus loading .solverstate files, it seems caffe will load the linked-to .caffemodel file without calling UpgradeNetAsNeeded() on the loaded net as it does elsewhere. this seems to cause the resultant loaded net to be (silently) garbage in the case where the linked-to prototxt needed an upgrade. perhaps we want to do something like this? i guess this is only an issue for resuming 'old' training runs, which might not in general be supported. but if it's not to be supported, perhaps it should be error-checked somehow? and perhaps even if it's generally unsupported this feature/fix might be wanted.

@shelhamer shelhamer added the JD label Feb 25, 2015
jeffdonahue added a commit that referenced this pull request Mar 13, 2015
Use ReadNetParamsFromBinaryFileOrDie to read a net param when restoring
from a saved solverstate, which upgrades old nets, rather than
ReadProtoFromBinaryFile.
@jeffdonahue
Copy link
Contributor

Thanks for pointing this out @moskewcz. I fixed this in e46cf85 by changing the call from ReadProtoFromBinaryFile to ReadNetParamsFromBinaryFileOrDie used to load net params from binary files in the rest(?) of Caffe.

matthiasplappert pushed a commit to matthiasplappert/caffe that referenced this pull request Aug 10, 2015
Use ReadNetParamsFromBinaryFileOrDie to read a net param when restoring
from a saved solverstate, which upgrades old nets, rather than
ReadProtoFromBinaryFile.
cbfinn pushed a commit to cbfinn/caffe that referenced this pull request Aug 12, 2015
Use ReadNetParamsFromBinaryFileOrDie to read a net param when restoring
from a saved solverstate, which upgrades old nets, rather than
ReadProtoFromBinaryFile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants