how to save solverstate not just model with python api?

521 views
Skip to first unread message

meigui...@gmail.com

unread,
Mar 2, 2016, 1:20:51 AM3/2/16
to Caffe Users
when use solver.solve() , the solverstate and the model will be saved for use. 
But when i use solver.step(), i can only use solver.net.save() to save the model, 
what should i do to save the solverstate for lateruse?

Jan C Peters

unread,
Mar 2, 2016, 4:39:36 AM3/2/16
to Caffe Users
You can directly use solver.snapshot() (see code), that should save the caffemodel as well as the solverstate (as it is just the function that is called when a regular snapshot is created).

Jan

meigui...@gmail.com

unread,
Mar 2, 2016, 9:13:38 AM3/2/16
to Caffe Users
Thank you!I don't find the snapshot() in _caffe.cpp in my caffe directory. 
When i install the new version caffe, solver.snapshot()  works very well.

Hossein Kashiyani

unread,
Feb 19, 2018, 3:43:05 AM2/19/18
to Caffe Users
did you find a solution?
Reply all
Reply to author
Forward
0 new messages