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

Function BlobVec_add_blob

python/caffe/_caffe.cpp:258–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258bp::object BlobVec_add_blob(bp::tuple args, bp::dict kwargs) {
259 if (bp::len(kwargs) > 0) {
260 throw std::runtime_error("BlobVec.add_blob takes no kwargs");
261 }
262 typedef vector<shared_ptr<Blob<Dtype> > > BlobVec;
263 BlobVec* self = bp::extract<BlobVec*>(args[0]);
264 vector<int> shape(bp::len(args) - 1);
265 for (int i = 1; i < bp::len(args); ++i) {
266 shape[i - 1] = bp::extract<int>(args[i]);
267 }
268 self->push_back(shared_ptr<Blob<Dtype> >(new Blob<Dtype>(shape)));
269 // We need to explicitly return None to use bp::raw_function.
270 return bp::object();
271}
272
273template<typename Dtype>
274class SolverCallback: public Solver<Dtype>::Callback {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected