why solverstate is always nearly 2 times filesize of the coresponding caffemodel filesize?

19 views
Skip to first unread message

不爱吃猫的鱼

unread,
Nov 7, 2017, 8:11:03 AM11/7/17
to Caffe Users
I have read some caffe source code about SnapshotSolverState, but I find solverstate is only storing the coresponding caffemodel's filename, the main part of solverstate may be the history blobproto, so the solverstate file's size should be nearly same as caffemodel's,  but actually it's 2times of caffemodel.

Why it happens?

thank you for answering

Przemek D

unread,
Nov 7, 2017, 8:41:09 AM11/7/17
to Caffe Users
Solver state saves network's weights and gradients, hence the almost 2x size than the caffemodel (which only stores weights).

不爱吃猫的鱼

unread,
Nov 8, 2017, 3:55:04 AM11/8/17
to Caffe Users
would you please show me where the code is that solverstate saves network's weights in the source code tree of caffe?  Thanks anyway!
I read the code but only to find that solverstate stores the training info (such as current step, current iteration number ...) and `history_` blobs whose cpu_data() store last weight update delta (i.e gradient) and a filename of the corresponding caffemodel file.  where am I wrong?

在 2017年11月7日星期二 UTC+8下午9:41:09,Przemek D写道:

Przemek D

unread,
Nov 9, 2017, 9:29:21 AM11/9/17
to Caffe Users
You're completely right: caffemodel stores weights and solverstate stores gradients and the name of the respective weights-holding caffemodel (as seen here). I'm sorry for the confusion.

It's strange though as they should indeed be very similar in size... I just checked mine and they definitely are.
Reply all
Reply to author
Forward
0 new messages