【caffe】Layer解读之:Concat

  • Layer type: Concat
  • 头文件位置: ./include/caffe/layers/concat_layer.hpp
  • CPU 执行源文件位置:./src/caffe/layers/concat_layer.cpp
  • CUDA GPU 执行源文件位置: ./src/caffe/layers/concat_layer.cu
  • Concat层的功能:Concat层是一个实用程序层,它将多个输入blob连接到一个输出blob(按照给定的axis,注意除了规定的axis以外,被concat的输入bolb的其他维度的size必须一致)。
参数解读
layer {
  name: "concat"
  bottom: "in1"
  bottom: "in2"
  top: "out"
  type: "Concat"
  concat_param {
    axis: 1//default = 1
  }
}
参数定义

参数(ConcatParameter concat_param)
定义位置 ./src/caffe/proto/caffe.proto:

message ConcatParameter {
  // The axis along which to concatenate -- may be negative to index from the
  // end (e.g., -1 for the last axis).  Other axes must have the
  // same dimension for all the bottom blobs.
  // By default, ConcatLayer concatenates blobs along the "channels" axis (1).
  optional int32 axis = 2 [default = 1];

  // DEPRECATED: alias for "axis" -- does not support negative indexing.
  optional uint32 concat_dim = 1 [default = 1];
}

猜你喜欢

转载自blog.csdn.net/qiu931110/article/details/81584929