【问题标题】:Compute the mean of a data blob during testing phase在测试阶段计算数据块的平均值
【发布时间】:2017-11-06 00:07:52
【问题描述】:

我正在使用具有数据和标签的 hdf5 层。

layer {
  name: "data"
  type: "HDF5Data"
  top: "data"
  top: "label"
  include {
    phase: TEST
  }
  hdf5_data_param {
    source: "./list.txt"
    batch_size: 8
    shuffle: true
  }
}

在测试阶段,它将从测试集中加载 8 张图像并馈送到网络。我想在测试阶段打印每个图像的平均值。可以在 CAFFE 中使用吗?我应该使用哪一层?

【问题讨论】:

    标签: machine-learning neural-network computer-vision deep-learning caffe


    【解决方案1】:

    我想你正在寻找"Reduction"

    layer {
      type: "Reduction"
      name: "img_mean"
      bottom: "data"
      top: "img_mean"
      reduction_param {
        operation: MEAN
        axis: 0  # to reduce the entire batch, or axis: 1 for per-image mean
      }
    }
    

    【讨论】:

    • 谢谢。这是正确的。但它有轻微的错字。一定是减少
    猜你喜欢
    • 2018-07-19
    • 2021-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多