]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - jacinto-ai/caffe-jacinto.git/blobdiff - src/caffe/optimization/solver.hpp
cpplint
[jacinto-ai/caffe-jacinto.git] / src / caffe / optimization / solver.hpp
index f20a06e85e437db4423a59b95d0da5a27d01db57..8dc41aff8b5e4f782c0a55f5c201b97fd314916e 100644 (file)
@@ -1,6 +1,10 @@
+// Copyright Yangqing Jia 2013
+
 #ifndef CAFFE_OPTIMIZATION_SOLVER_HPP_
 #define CAFFE_OPTIMIZATION_SOLVER_HPP_
 
+#include <vector>
+
 namespace caffe {
 
 template <typename Dtype>
@@ -10,11 +14,12 @@ class Solver {
       : 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);
@@ -25,6 +30,7 @@ class Solver {
   DISABLE_COPY_AND_ASSIGN(Solver);
 };
 
+
 template <typename Dtype>
 class SGDSolver : public Solver<Dtype> {
  public:
@@ -42,4 +48,4 @@ class SGDSolver : public Solver<Dtype> {
 
 }  // namspace caffe
 
-#endif  // CAFFE_OPTIMIZATION_SOLVER_HPP_
\ No newline at end of file
+#endif  // CAFFE_OPTIMIZATION_SOLVER_HPP_