Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caffe snapshots: .solverstate vs .caffemodel

When training a network, the snapshots taken every N iterations come in two forms together. One is the .solverstate file, which I presume is exactly what it sounds like, storing the state of the loss functions and gradients, etc. The other is the .caffemodel file which I know stores the trained parameters.

The .caffemodel is the file you need if you want a pre-trained model, so I imagine it's also the file you want if you are going to test your network.

WWhat is the .solverstate good for? In this tutorial it looks like you can restart training from it, but how does that differ than using the .caffemodel? Does .solverstate also include the same info as .caffemodel? Put another way, is .caffemodel just a subset of .solverstate?

like image 242
marcman Avatar asked Apr 08 '16 16:04

marcman


1 Answers

The solverstate file, as its name conveys, stores the state of the solver and not any information related to classification results. The model is saved as caffemodel file, which you can use to obtain classification results for your data. If you want to fine-tune your network you may use a pre-trained caffemodel file. This will save time as your network does not need to learn from scratch. But, in case your present training needs to be halted, due to a power cut or an unexpected reboot, you may resume your training form the previous snapshot of the solverstate. The difference between using the solverstate and the caffemodel files is that the former allows you to complete your training in the pre-determined manner while the latter may require changes in certain training parameters such as the maximum number of iterations.

like image 165
Harsh Wardhan Avatar answered Oct 05 '22 05:10

Harsh Wardhan