小编Ank*_*ahu的帖子

Caffe中的Min-Max规范化层

我是caffe的新手,我试图用Min-Max Normalization将卷积输出归一化到0到1之间.

Out = X - Xmin /(Xmax - Xmin)

我检查了很多层(功率,比例,批量标准化,MVN),但没有人给我层中的最小 - 最大标准化输出.谁能帮我 ??

*************我的原型文件*****************

name: "normalizationCheck"
layer {
  name: "data"
  type: "Input"
  top: "data"
  input_param { shape: { dim: 1 dim: 1 dim: 512 dim: 512 } }
}

layer {
  name: "normalize1"
  type: "Power"
  bottom: "data"
  top: "normalize1"
  power_param { 
    shift: 0
    scale: 0.00392156862
    power: 1
   }
}

layer {
    bottom: "normalize1"
    top: "Output"
    name: "conv1"
    type: "Convolution"
    convolution_param {
        num_output: 1
        kernel_size: 1
        pad: 0
        stride: 1 …
Run Code Online (Sandbox Code Playgroud)

c++ normalization neural-network deep-learning caffe

6
推荐指数
1
解决办法
804
查看次数

在caffe windows cpp中自定义卷积层

我有这个网'RGB2GRAY.prototxt':

name: "RGB2GRAY"
layer {
  name: "data"
  type: "Input"
  top: "data"
  input_param { shape: { dim: 1 dim: 3 dim: 512 dim: 512 } }
}

layer {
    name: "conv1"
    bottom: "data"
    top: "conv1"
    type: "Convolution"
    convolution_param {
        num_output: 1
        kernel_size: 1
        pad: 0
        stride: 1
        bias_term: false
        weight_filler {
        type: "constant"
        value: 1
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

我正在尝试使用此公式将RGB转换为灰色的自己的网络

x = 0.299r + 0.587g + 0.114b.
Run Code Online (Sandbox Code Playgroud)

基本上,我可以使用自定义权重(0.299,0.587,0.114)进行内核大小为1的卷积.但我没有得到如何修改卷积层.我设置了权重和偏差,但无法修改过滤器值.我尝试过以下方法,但无法更新卷积滤镜.

shared_ptr<Net<float> > net_;
net_.reset(new Net<float>("path of model file", TEST));

const shared_ptr<Blob<float> >& …
Run Code Online (Sandbox Code Playgroud)

c++ neural-network deep-learning caffe conv-neural-network

5
推荐指数
1
解决办法
618
查看次数