1. 程式人生 > >Caffe層系列:Concat Layer

Caffe層系列:Concat Layer

Concat Layer將多個bottom按照需要聯結一個top

一般特點是:多個輸入一個輸出,多個輸入除了axis指定維度外,其他維度要求一致

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];
}

Concat Layer在prototxt裡面的書寫:

layer {
	  name: "concat"
	  bottom: "in1"    #N*32*H*W
	  bottom: "in2"    #N*16*H*W
	  top: "out"       #N*48*H*W
	  type: "Concat"
	  concat_param {
	    axis: 1//default = 1 按通道聯結
	  }
}