index f20a06e85e437db4423a59b95d0da5a27d01db57..8dc41aff8b5e4f782c0a55f5c201b97fd314916e 100644 (file)
+// Copyright Yangqing Jia 2013
+
#ifndef CAFFE_OPTIMIZATION_SOLVER_HPP_
#define CAFFE_OPTIMIZATION_SOLVER_HPP_
+#include <vector>
+
namespace caffe {
template <typename Dtype>
: param_(param) {}
// The main entry of the solver function.
void Solve(Net<Dtype>* net);
+ virtual ~Solver() {}
protected:
// PreSolve is run before any solving iteration starts, allowing one to
// put up some scaffold.
- virtual void PreSolve() {};
+ virtual void PreSolve() {}
// Get the update value for the current iteration.
virtual void ComputeUpdateValue() = 0;
void Snapshot(bool is_final = false);
DISABLE_COPY_AND_ASSIGN(Solver);
};
+
template <typename Dtype>
class SGDSolver : public Solver<Dtype> {
public:
} // namspace caffe
-#endif // CAFFE_OPTIMIZATION_SOLVER_HPP_
\ No newline at end of file
+#endif // CAFFE_OPTIMIZATION_SOLVER_HPP_