-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Specify net params in solver; log {Net,Solver} parameters; multiple test nets #404
Conversation
great PR! the only thing is that when you want to test on different sets (like a test and a validation set) the sets probably have different sizes, but right now there is only a single test_iter. |
Yup, thanks @tdomhan, good point. |
Nice. The lenet example and requiring one or the other netparam options are helpful for this to be used right. Plus this is a good stop-gap until I finally do #57 haha. Thanks @jeffdonahue and @tdomhan! |
Specify net params in solver; log {Net,Solver} parameters; multiple test nets
Specify net params in solver; log {Net,Solver} parameters; multiple test nets
This PR introduces three changes:
(65ef9ff) Allows you to specify, inside a SolverParameter, a
train_net_param
(instead of atrain_net
filename) and atest_net_param
(instead of atest_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).(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_param
s ortest_net
s, processing them in order starting with alltest_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).