Caffe training without testing

I use Caffe to train AlexNet in a well-known image database. I am comparing and want to exclude the testing phase.

Below is an example of solver.prototxt for AlexNet:

 net: "models/bvlc_alexnet/train_val.prototxt" test_iter: 1000 test_interval: 1000 base_lr: 0.01 lr_policy: "step" gamma: 0.1 stepsize: 100000 display: 20 max_iter: 450000 momentum: 0.9 weight_decay: 0.0005 snapshot: 10000 snapshot_prefix: "models/bvlc_alexnet/caffe_alexnet_train" solver_mode: GPU 

Until I found the final document, which describes in detail all the parameters of the prototype, comments in the Caffe tutorials indicate that " test_interval " represents the number of iterations, after which we test the prepared network.

I decided that I could set it to zero to disable testing. Not.

 F1124 14:42:54.691428 18772 solver.cpp:140] Check failed: param_.test_interval() > 0 (0 vs. 0) *** Check failure stack trace: *** 

So, I set test_interval to one million, but still, of course, Caffe checks the network for iteration zero.

 I1124 14:59:12.787899 18905 solver.cpp:340] Iteration 0, Testing net (#0) I1124 14:59:15.698724 18905 solver.cpp:408] Test net output #0: accuracy = 0.003 

How to disable testing during training?

+7
deep-learning machine-learning neural-network caffe
source share
2 answers

Caffe's documentation is a bit sparse in detail. Finally, I was told that this is a contradictory solution:

In your solver.prototxt, take the lines for test_iter and test_interval

 test_iter: 1000 test_interval: 1000 

and just drop them. If you want to prevent the test at the beginning, you would add a line as @shai :

 test_initialization: false 
+11
source share

You also have a flag. Add

 test_initialization: false 

To your 'solver.prototxt' and you 'solver.prototxt' done;)

+6
source share

All Articles