pycaffe: let boost pass shared_ptr<CaffeNet>
authorJonathan L Long <jonlong@cs.berkeley.edu>
Fri, 25 Apr 2014 21:09:02 +0000 (14:09 -0700)
committerJonathan L Long <jonlong@cs.berkeley.edu>
Fri, 2 May 2014 20:25:51 +0000 (13:25 -0700)
python/caffe/_caffe.cpp

index a443f89..1a44deb 100644 (file)
@@ -317,7 +317,7 @@ class CaffeSGDSolver {
 
 // The boost python module definition.
 BOOST_PYTHON_MODULE(_caffe) {
-  boost::python::class_<CaffeNet>(
+  boost::python::class_<CaffeNet, shared_ptr<CaffeNet> >(
       "Net", boost::python::init<string, string>())
       .def(boost::python::init<string>())
       .def("Forward",          &CaffeNet::Forward)