我有一个尺寸为nxmx16x1的conv层,我想计算16个过滤器的平均值或和,所以结果是1个dim nxmx1x1x1的过滤器。
类似于matlab中的mean(a,3)
使用常数1X1 "Conv" 过滤器:
"Conv"
layer { name: "avg" type: "Convolution" bottom: "input" top: "output" param { lr_mult: 0 decay_mult: 0 } # fix this layer, do not train convolution_param { num_output: 1 kernel_size: 1 bias: false # no bias weight_filler: { type: "constant" value: 0.0625 } # 1/16. } }