Specify net params in solver; log {Net,Solver} parameters; multiple test nets #404
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces three changes:
(65ef9ff) Allows you to specify, inside a SolverParameter, a
train_net_param(instead of atrain_netfilename) and atest_net_param(instead of atest_netfilename), directly specifying the full net parameters inside the solver prototxt. Crashes if both train_net_param and train_net are specified. Rationale: IMO, especially for small nets, it's easier than viewing/editing 2-3 separate files. (I like to use find/replace all and not have to do it in both the train/test net separately.) Also would be useful in any future Solver unit tests (rather than having to create inside the unit test a temp train net and temp test net file).(bf66ac2) Logs the Net/Solver parameters upon init to
INFO. Rationale: I have probably thousands of Caffe logs from training runs where I was "manually cross-validating" a parameter or two inside of a net or solver and quickly starting/stopping training without actually saving a copy of the net/solver prototxts. If those logs had the Solver/Net parameters in them, it would be substantially easier to tell what meaning (if any) they had. The drawbacks would be the increased size of the logs and increased amount of (in this case mostly redundant) information printed during training, but at least in my use of Caffe, the benefit strongly outweighs the drawback here...(c97fff6) Allows you to specify multiple test nets (either as
test_net_params ortest_nets, processing them in order starting with alltest_net_params). Rationale: measure accuracy on additional datasets (e.g., the training set), with multiple loss functions, ...In b64c597 I added a file
lenet_consolidated_solver.prototxtwhich demos changes (1) and (3).