|
|
@@ -60,6 +60,11 @@ class Solver { |
|
|
// RestoreSolverStateFrom___ protected methods. You should implement these
|
|
|
// methods to restore the state from the appropriate snapshot type.
|
|
|
void Restore(const char* resume_file);
|
|
|
+ // The Solver::Snapshot function implements the basic snapshotting utility
|
|
|
+ // that stores the learned net. You should implement the SnapshotSolverState()
|
|
|
+ // function that produces a SolverState protocol buffer that needs to be
|
|
|
+ // written to disk together with the learned net.
|
|
|
+ void Snapshot();
|
|
|
virtual ~Solver() {}
|
|
|
inline const SolverParameter& param() const { return param_; }
|
|
|
inline shared_ptr<Net<Dtype> > net() { return net_; }
|
|
|
@@ -87,11 +92,6 @@ class Solver { |
|
|
protected:
|
|
|
// Make and apply the update value for the current iteration.
|
|
|
virtual void ApplyUpdate() = 0;
|
|
|
- // The Solver::Snapshot function implements the basic snapshotting utility
|
|
|
- // that stores the learned net. You should implement the SnapshotSolverState()
|
|
|
- // function that produces a SolverState protocol buffer that needs to be
|
|
|
- // written to disk together with the learned net.
|
|
|
- void Snapshot();
|
|
|
string SnapshotFilename(const string extension);
|
|
|
string SnapshotToBinaryProto();
|
|
|
string SnapshotToHDF5();
|
|
|
|