We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 32ced4f + 50195e3 commit 633ad15Copy full SHA for 633ad15
python/caffe/_caffe.cpp
@@ -230,6 +230,11 @@ BOOST_PYTHON_MODULE(_caffe) {
230
231
bp::class_<Blob<Dtype>, shared_ptr<Blob<Dtype> >, boost::noncopyable>(
232
"Blob", bp::no_init)
233
+ .add_property("shape",
234
+ bp::make_function(
235
+ static_cast<const vector<int>& (Blob<Dtype>::*)() const>(
236
+ &Blob<Dtype>::shape),
237
+ bp::return_value_policy<bp::copy_const_reference>()))
238
.add_property("num", &Blob<Dtype>::num)
239
.add_property("channels", &Blob<Dtype>::channels)
240
.add_property("height", &Blob<Dtype>::height)
0 commit comments