usage of concat layer

Concatenation

LayerType: CONCAT
CPU implementation: ./src/caffe/layers/concat_layer.cpp
CUDA GPU implementation: ./src/caffe/layers/concat_layer.cu
Parameters (ConcatParameter concat_param)
Optional
concat_dim [default 1]: 0 for concatenation along num and 1 for channels.
Input
n_i * c_i * h * w for each input blob i from 1 to K.
Output

if concat_dim = 0:

(n_1 + n_2 + ... + n_K) * c_1 * h * w, and all input c_i should be the same.

for example, two images img0, img1, which both have three channels, so im0: R0, G0, B0 and  im1: R1, G1, B1, in this case,

after concatenation along image_num, the output blob is R0, G0, B0, R1, G1, B1.


if concat_dim = 1:

n_1 * (c_1 + c_2 + ... + c_K) * h * w, and all input n_i should be the same.

for example, two images img0, img1, which both have three channels, so im0: R0, G0, B0 and  im1: R1, G1, B1, in this case,

after concatenation along image_num, the output blob is R0, R1, G0, G1, B0, B1.

Sample

layers {
name: "concat"
bottom: "in1"
bottom: "in2"
top: "out"
type: CONCAT
concat_param {
concat_dim: 1
}
}

The CONCAT layer is a utility layer that concatenates its multiple input blobs to one single output blob. Currently, the layer supports concatenation along num or channels only.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值