首页 > 解决方案 > Caffe 深度学习框架将 Normalize 转换为 BatchNorm

问题描述

我正在使用 TIDL(TI 深度学习库)来转换深度学习模型以用于嵌入式系统。我使用的版本不支持 Caffe 的“Normalize”层,所以我想以某种方式使用“BatchNorm”。通过直接编辑 prototxt 文件可以实现这样的事情吗?如果是这样,我如何将 Normalize 修改为 BatchNorm,因为它们采用不同的参数。

非常感谢任何帮助。谢谢你。

...
    layer {
      name: "conv10_2_relu"
      type: "ReLU"
      bottom: "conv10_2"
      top: "conv10_2"
    }
    layer {
      name: "conv4_3_norm"
      type: Normalize
      bottom: "conv4_3"
      top: "conv4_3_norm"
      norm_param {
        across_spatial: false
        scale_filler {
          type: "constant"
          value: 20
        }
        channel_shared: false
      }
    }
    layer {
      name: "conv4_3_norm_mbox_loc"
      type: "Convolution"
      bottom: "conv4_3_norm"
      top: "conv4_3_norm_mbox_loc"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 16
        pad: 1
        kernel_size: 3
        stride: 1
        weight_filler {
          type: "xavier"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
      }
    }
...

标签: deep-learningcaffe

解决方案


推荐阅读