projects
/
platform
/
upstream
/
caffe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6228624
)
pycaffe: blobs and params are properties, not methods
author
Jonathan L Long
<jonlong@cs.berkeley.edu>
Sat, 1 Mar 2014 09:48:06 +0000
(
01:48
-0800)
committer
Jonathan L Long
<jonlong@cs.berkeley.edu>
Thu, 13 Mar 2014 18:15:57 +0000
(11:15 -0700)
python/caffe/pycaffe.cpp
patch
|
blob
|
history
diff --git
a/python/caffe/pycaffe.cpp
b/python/caffe/pycaffe.cpp
index
581c7a7
..
ae0cdf0
100644
(file)
--- a/
python/caffe/pycaffe.cpp
+++ b/
python/caffe/pycaffe.cpp
@@
-266,8
+266,9
@@
BOOST_PYTHON_MODULE(pycaffe) {
.def("set_phase_train", &CaffeNet::set_phase_train)
.def("set_phase_test", &CaffeNet::set_phase_test)
.def("set_device", &CaffeNet::set_device)
- .def("blobs", &CaffeNet::blobs)
- .def("params", &CaffeNet::params);
+ .add_property("blobs", &CaffeNet::blobs)
+ .add_property("params", &CaffeNet::params)
+ ;
boost::python::class_<CaffeBlob, CaffeBlobWrap>(
"CaffeBlob", boost::python::no_init)