void Blob<Dtype>::Update() {
// not implemented yet.
LOG(FATAL) << "not implemented";
+ // We will perform update based on where the data is located.
}
template <typename Dtype>
void ToProto(NetParameter* param, bool write_diff = false);
// returns the network name.
- const string& name() { return name_; }
+ inline const string& name() { return name_; }
// returns the layer names
- const vector<string>& layer_names() { return layer_names_; }
+ inline const vector<string>& layer_names() { return layer_names_; }
// returns the blob names
- const vector<string>& blob_names() { return blob_names_; }
+ inline const vector<string>& blob_names() { return blob_names_; }
+ // returns the blobs
+ inline const vector<shared_ptr<Blob<Dtype> > >& blobs() { return blobs_; }
+ // rethrns the layers
+ inline const vector<shared_ptr<Layer<Dtype> > >& layers() { return layers_; }
protected:
// Individual layers in the net
Net<TypeParam> caffe_net(net_param, bottom_vec);
EXPECT_EQ(caffe_net.layer_names().size(), 9);
EXPECT_EQ(caffe_net.blob_names().size(), 10);
+
+ for (int i = 0; i < caffe_net.blobs().size(); ++i) {
+ LOG(ERROR) << "Blob: " << caffe_net.blob_names()[i];
+ LOG(ERROR) << "size: " << caffe_net.blobs()[i]->num() << ", "
+ << caffe_net.blobs()[i]->channels() << ", "
+ << caffe_net.blobs()[i]->height() << ", "
+ << caffe_net.blobs()[i]->width();
+ }
}
} // namespace caffe