summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/caffe/net.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/caffe/net.cpp b/src/caffe/net.cpp
index b7320e95..c1760ea1 100644
--- a/src/caffe/net.cpp
+++ b/src/caffe/net.cpp
@@ -103,6 +103,12 @@ void Net<Dtype>::Init(const NetParameter& in_param) {
int num_top = layer_param.top_size();
for (int top_id = 0; top_id < num_top; ++top_id) {
AppendTop(param, layer_id, top_id, &available_blobs, &blob_name_to_idx);
+ // Collect Input layer tops as Net inputs.
+ if (layer_param.type() == "Input") {
+ const int blob_id = blobs_.size() - 1;
+ net_input_blob_indices_.push_back(blob_id);
+ net_input_blobs_.push_back(blobs_[blob_id].get());
+ }
}
// If the layer specifies that AutoTopBlobs() -> true and the LayerParameter
// specified fewer than the required number (as specified by