BVLC/caffe — pull request #404 by jeffdonahue (2014-05-10 04:13:46+00:00)
Title: Specify net params in solver; log {Net,Solver} parameters; multiple test nets

This PR introduces three changes:

1) (65ef9ff) Allows you to specify, inside a SolverParameter, a `train_net_param` (instead of a `train_net` filename) and a `test_net_param` (instead of a `test_net` filename), 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).

2) (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...

3) (c97fff6) Allows you to specify multiple test nets (either as `train_net_param`s or `test_net`s, processing them in order starting with all `train_net_param`s). Rationale: measure accuracy on additional datasets (e.g., the training set), with multiple loss functions, ...

In b64c597 I added a file `lenet_consolidated_solver.prototxt` which demos changes (1) and (3).