【问题标题】:Which part of the deploy.prototxt file in caffe is absolutely necessary for testing?caffe 中的 deploy.prototxt 文件的哪一部分对于测试是绝对必要的?
【发布时间】:2016-04-19 07:38:53
【问题描述】:

在最近的一次讨论中,我发现 deploy.prototxt 的某些部分之所以存在,只是因为它们是直接从 train_test.prototxt 复制而来的,并且在测试期间被忽略了。例如:

    layer {
  name: "conv1"
  type: "Convolution"
  bottom: "data"
  top: "conv1"
  param {                     #Starting here
    lr_mult: 1
  }
  param {
    lr_mult: 2
  }                           #To here
  convolution_param {         #is this section useful?
    num_output: 20
    kernel_size: 5
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
}

有人告诉我,包含 LR 作为偏差的权重部分在部署文件中没有用,可以删除。这让我想到,convolution_param 部分是绝对需要的吗?如果是,我们是否还需要定义权重和偏置填充器,因为我们只会使用这个文件进行测试,并且填充器仅在我们需要训练网络时才初始化。有没有其他不必要的细节?

【问题讨论】:

    标签: caffe conv-neural-network nvidia-digits


    【解决方案1】:

    convolution_param 部分是必需的,但您可以根据需要删除 weight_filler 和 bias_filler。

    【讨论】:

    • 谢谢你苛刻!不过有一个小问题:我是否“需要”删除它,或者如果我愿意,我可以删除它,否则无论如何它都不会成为问题。
    【解决方案2】:
    layer {
      name: "conv1"
      type: "Convolution"
      bottom: "data"
      top: "conv1"
      convolution_param {
        num_output: 20
        kernel_size: 5
        stride: 1
      }
    }
    

    上面的层在Test期间运行良好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-05-05
      • 2019-01-19
      • 2020-01-12
      • 2015-11-21
      • 2015-12-30
      • 2016-04-17
      • 2016-08-28
      相关资源
      最近更新 更多