MCPcopy Create free account
hub / github.com/BVLC/caffe / Blob_Reshape

Function Blob_Reshape

python/caffe/_caffe.cpp:244–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242};
243
244bp::object Blob_Reshape(bp::tuple args, bp::dict kwargs) {
245 if (bp::len(kwargs) > 0) {
246 throw std::runtime_error("Blob.reshape takes no kwargs");
247 }
248 Blob<Dtype>* self = bp::extract<Blob<Dtype>*>(args[0]);
249 vector<int> shape(bp::len(args) - 1);
250 for (int i = 1; i < bp::len(args); ++i) {
251 shape[i - 1] = bp::extract<int>(args[i]);
252 }
253 self->Reshape(shape);
254 // We need to explicitly return None to use bp::raw_function.
255 return bp::object();
256}
257
258bp::object BlobVec_add_blob(bp::tuple args, bp::dict kwargs) {
259 if (bp::len(kwargs) > 0) {

Callers

nothing calls this directly

Calls 1

ReshapeMethod · 0.45

Tested by

no test coverage detected