summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 81aed37)
raw | patch | inline | side by side (parent: 81aed37)
author | Yangqing Jia <jiayq84@gmail.com> | |
Fri, 27 Sep 2013 00:01:08 +0000 (17:01 -0700) | ||
committer | Yangqing Jia <jiayq84@gmail.com> | |
Fri, 27 Sep 2013 00:01:08 +0000 (17:01 -0700) |
src/caffe/blob.cpp | patch | blob | history | |
src/caffe/net.hpp | patch | blob | history | |
src/caffe/test/test_net_proto.cpp | patch | blob | history |
diff --git a/src/caffe/blob.cpp b/src/caffe/blob.cpp
index 0a00ce5a539402cde34fc020e00fedc9a43afd25..8260fe0f99c9e8791725871cc4e5d359c00deb2e 100644 (file)
--- a/src/caffe/blob.cpp
+++ b/src/caffe/blob.cpp
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>
diff --git a/src/caffe/net.hpp b/src/caffe/net.hpp
index 45ea708dbca32e11505a30758ebfbf16b606a8a6..a653df5c78b3b4fd8654f298b2ca2a76bf383f22 100644 (file)
--- a/src/caffe/net.hpp
+++ b/src/caffe/net.hpp
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
index b328d3a7fb21fe3ec4b8ef785e3510b29cc52820..f53107e688ba7f952c952e2a3a124326ea0e16b9 100644 (file)
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