summaryrefslogtreecommitdiff
path: root/python/caffe/_caffe.cpp
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2014-10-10 00:16:31 -0700
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2014-10-10 00:16:31 -0700
commit7eecdf9c804e2b6a162e44c3a7a4b58317ed394b (patch)
tree61c3c526209c66c42e1b9e6c5d490c3cea34d762 /python/caffe/_caffe.cpp
parenta3177e34bdf4e2a951ffdf00b1ac2d33f2e58e13 (diff)
parent0dfda37c7f463b19f1504a08dc026b38bdddf7c6 (diff)
downloadcaffeonacl-7eecdf9c804e2b6a162e44c3a7a4b58317ed394b.tar.gz
caffeonacl-7eecdf9c804e2b6a162e44c3a7a4b58317ed394b.tar.bz2
caffeonacl-7eecdf9c804e2b6a162e44c3a7a4b58317ed394b.zip
Merge pull request #1195 from longjon/python-copy-from
Expose Net.copy_from and Net.share_with in pycaffe
Diffstat (limited to 'python/caffe/_caffe.cpp')
-rw-r--r--python/caffe/_caffe.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/caffe/_caffe.cpp b/python/caffe/_caffe.cpp
index 86fd8367..f03dae3d 100644
--- a/python/caffe/_caffe.cpp
+++ b/python/caffe/_caffe.cpp
@@ -153,6 +153,8 @@ BOOST_PYTHON_MODULE(_caffe) {
bp::class_<PyNet, shared_ptr<PyNet> >(
"Net", bp::init<string, string>())
.def(bp::init<string>())
+ .def("copy_from", &PyNet::CopyTrainedLayersFrom)
+ .def("share_with", &PyNet::ShareTrainedLayersWith)
.def("_forward", &PyNet::Forward)
.def("_backward", &PyNet::Backward)
.def("reshape", &PyNet::Reshape)