summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsguada <sguada@gmail.com>2014-02-17 17:08:30 -0800
committerSergio Guadarrama <sguada@gmail.com>2014-02-27 18:48:22 -0800
commitff2ac0b28ec9d9eecfc2b73da2b5136416d3e06b (patch)
tree737b7dc46f264117a2e55f40c0d92535caf758e2 /src
parent2b125e358a1fb14869f41f0b30662d38f6ce16ff (diff)
downloadcaffeonacl-ff2ac0b28ec9d9eecfc2b73da2b5136416d3e06b.tar.gz
caffeonacl-ff2ac0b28ec9d9eecfc2b73da2b5136416d3e06b.tar.bz2
caffeonacl-ff2ac0b28ec9d9eecfc2b73da2b5136416d3e06b.zip
Added concat_dim to caffe.proto and ConcatLayer to set of layers
Diffstat (limited to 'src')
-rw-r--r--src/caffe/layer_factory.cpp2
-rw-r--r--src/caffe/proto/caffe.proto5
2 files changed, 7 insertions, 0 deletions
diff --git a/src/caffe/layer_factory.cpp b/src/caffe/layer_factory.cpp
index d7798ea9..1f79a746 100644
--- a/src/caffe/layer_factory.cpp
+++ b/src/caffe/layer_factory.cpp
@@ -25,6 +25,8 @@ Layer<Dtype>* GetLayer(const LayerParameter& param) {
return new BNLLLayer<Dtype>(param);
} else if (type == "conv") {
return new ConvolutionLayer<Dtype>(param);
+ } else if (type == "concat") {
+ return new ConcatLayer<Dtype>(param);
} else if (type == "data") {
return new DataLayer<Dtype>(param);
} else if (type == "hdf5_data") {
diff --git a/src/caffe/proto/caffe.proto b/src/caffe/proto/caffe.proto
index 4da8e8d3..06a7cd71 100644
--- a/src/caffe/proto/caffe.proto
+++ b/src/caffe/proto/caffe.proto
@@ -91,6 +91,11 @@ message LayerParameter {
// point would be set as rand_skip * rand(0,1). Note that rand_skip should not
// be larger than the number of keys in the leveldb.
optional uint32 rand_skip = 53 [ default = 0 ];
+
+ // Concat Layer need to specify the dimension along the concat will happen,
+ // the other dimensions must be the same for all the bottom blobs
+ // By default it will concatenate blobs along channels dimension
+ optional uint32 concat_dim = 65 [ default = 1 ];
}
message LayerConnection {