summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYangqing Jia <jiayq84@gmail.com>2013-11-11 11:10:39 -0800
committerYangqing Jia <jiayq84@gmail.com>2013-11-11 11:10:39 -0800
commita3875f5eb279a6ed973635a8913b5c9db27610bf (patch)
treed541946f684f3c21a581734be738a537bf803f27
parent22d82ffe15f4e995cc1ebfdda8216c7ab30f0695 (diff)
downloadcaffe-a3875f5eb279a6ed973635a8913b5c9db27610bf.tar.gz
caffe-a3875f5eb279a6ed973635a8913b5c9db27610bf.tar.bz2
caffe-a3875f5eb279a6ed973635a8913b5c9db27610bf.zip
bugfix
-rw-r--r--Makefile2
-rw-r--r--include/caffe/solver.hpp2
-rw-r--r--src/caffe/util/io.cpp1
3 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 93cf5376..3eaaddd1 100644
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,7 @@ INCLUDE_DIRS := ./src ./include /usr/local/include $(CUDA_INCLUDE_DIR) \
LIBRARY_DIRS := /usr/lib /usr/local/lib $(CUDA_LIB_DIR) $(MKL_LIB_DIR)
LIBRARIES := cuda cudart cublas curand protobuf opencv_core opencv_highgui \
glog mkl_rt mkl_intel_thread leveldb snappy pthread boost_system \
- python2.7 boost_python
+ python2.7 boost_python opencv_imgproc
WARNINGS := -Wall
COMMON_FLAGS := -DNDEBUG $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))
diff --git a/include/caffe/solver.hpp b/include/caffe/solver.hpp
index 2b402426..25ba3b68 100644
--- a/include/caffe/solver.hpp
+++ b/include/caffe/solver.hpp
@@ -16,6 +16,7 @@ class Solver {
virtual void Solve(const char* resume_file = NULL);
inline void Solve(const string resume_file) { Solve(resume_file.c_str()); }
virtual ~Solver() {}
+ inline Net<Dtype>* net() { return net_.get(); }
protected:
// PreSolve is run before any solving iteration starts, allowing one to
@@ -36,6 +37,7 @@ class Solver {
// function that restores the state from a SolverState protocol buffer.
void Restore(const char* resume_file);
virtual void RestoreSolverState(const SolverState& state) = 0;
+
SolverParameter param_;
int iter_;
shared_ptr<Net<Dtype> > net_;
diff --git a/src/caffe/util/io.cpp b/src/caffe/util/io.cpp
index c4682f52..ced807ae 100644
--- a/src/caffe/util/io.cpp
+++ b/src/caffe/util/io.cpp
@@ -7,6 +7,7 @@
#include <google/protobuf/io/coded_stream.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
+#include <opencv2/imgproc/imgproc.hpp>
#include <algorithm>
#include <string>