【问题标题】:caffe: average of conv layer filters (over channel)caffe:卷积层过滤器的平均值(通过通道)
【发布时间】:2018-11-27 01:15:05
【问题描述】:

我有一个维度为 nXmx16x1 的卷积层,我想计算 16 个滤波器的平均值或总和,因此结果是 1 个维度为 nxmx1x1 的滤波器。

类似于 matlab 中的 mean(A,3)

【问题讨论】:

    标签: neural-network deep-learning caffe conv-neural-network pycaffe


    【解决方案1】:

    使用常量 1x1 "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.
      }
    }
    

    【讨论】:

    • @Nima 你怎么能这么快接受这个答案?你检查了吗?
    猜你喜欢
    • 2018-11-26
    • 2018-11-24
    • 2022-11-13
    • 1970-01-01
    • 2021-09-11
    • 2019-11-28
    • 1970-01-01
    • 1970-01-01
    • 2018-04-12
    相关资源
    最近更新 更多