|
|
@@ -27,6 +27,10 @@ class Solver { |
|
|
virtual void Solve(const char* resume_file = NULL);
|
|
|
inline void Solve(const string resume_file) { Solve(resume_file.c_str()); }
|
|
|
void Step(int iters);
|
|
|
+ // The Restore function implements how one should restore the solver to a
|
|
|
+ // previously snapshotted state. You should implement the RestoreSolverState()
|
|
|
+ // function that restores the state from a SolverState protocol buffer.
|
|
|
+ void Restore(const char* resume_file);
|
|
|
virtual ~Solver() {}
|
|
|
inline shared_ptr<Net<Dtype> > net() { return net_; }
|
|
|
inline const vector<shared_ptr<Net<Dtype> > >& test_nets() {
|
|
|
@@ -46,10 +50,6 @@ class Solver { |
|
|
void TestAll();
|
|
|
void Test(const int test_net_id = 0);
|
|
|
virtual void SnapshotSolverState(SolverState* state) = 0;
|
|
|
- // The Restore function implements how one should restore the solver to a
|
|
|
- // previously snapshotted state. You should implement the RestoreSolverState()
|
|
|
- // function that restores the state from a SolverState protocol buffer.
|
|
|
- void Restore(const char* resume_file);
|
|
|
virtual void RestoreSolverState(const SolverState& state) = 0;
|
|
|
void DisplayOutputBlobs(const int net_id);
|
|
|
|
|
|
|