From: Jonathan L Long Date: Tue, 11 Mar 2014 05:02:08 +0000 (-0700) Subject: Add names to the blobs returned by CaffeLayer X-Git-Tag: submit/tizen/20180823.020014~739^2~23^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=922c4adfd1b3d09852901e813c5a207cd1bb2a64;p=platform%2Fupstream%2Fcaffeonacl.git Add names to the blobs returned by CaffeLayer Even though these are redundant, this keeps the meaning of CaffeBlob.name consistent for now, and will allow CaffeBlob construction to be simplified. --- diff --git a/python/caffe/_caffe.cpp b/python/caffe/_caffe.cpp index c5e9e84..c2a2618 100644 --- a/python/caffe/_caffe.cpp +++ b/python/caffe/_caffe.cpp @@ -108,7 +108,11 @@ class CaffeLayer { string name() const { return name_; } vector blobs() { - return vector(layer_->blobs().begin(), layer_->blobs().end()); + vector result; + for (int i = 0; i < layer_->blobs().size(); ++i) { + result.push_back(CaffeBlob(layer_->blobs()[i], name_)); + } + return result; } // this is here only to satisfy boost's vector_indexing_suite