卷积网络层计算

layers {

   name: "conv1"

    type: CONVOLUTION

   bottom: "data"

   top: "conv1"

   blobs_lr: 1               # learning rate multiplier for the filters

   blobs_lr: 2               # learning rate multiplier for the biases

   weight_decay: 1          # weight decay multiplier forthe filters

   weight_decay: 0          # weight decay multiplier forthe biases

   convolution_param {

       num_output: 96       # learn 96 filters

       kernel_size: 11      # each filter is 11x11

       stride: 4            # step 4 pixels between eachfilter application

       weight_filler {

           type: "gaussian"  # initialize the filters from a Gaussian

           std: 0.01         # distribution with stdev 0.01 (defaultmean: 0) }

           bias_filler {

                type: "constant"#initialize the biases to zero (0)

                value: 0

           }

       }

    }

}

 

blobs_lr: 学习率调整的参数,在上面的例子中设置权重学习率和运行中求解器给出的学习率一样,同时是偏置学习率为权重的两倍。 
weight_decay

卷积层的重要参数

必须参数:

  • num_output (c_o):过滤器的个数
  • kernel_size (or kernel_h and kernel_w):过滤器的大小(也就是所谓“核”的大小)。

建议参数:

  • weight_filler [default type: ‘constant’ value: 0]:参数的初始化方法

可选参数:

  • bias_filler:偏置的初始化方法
  • bias_term [default true]:指定是否是否开启偏置项
  • pad (or pad_h and pad_w) [default 0]:指定在输入的每一边加上多少个像素
  • stride (or stride_h and stride_w) [default 1]:指定过滤器的步长
  • group (g) [default 1]: 如果g>1,那么将每个滤波器都限定只与某个输入的子集有关联。换句话说,将输入分为g组,同时将输出也分为g组。那么第i组输出只与第i组输入有关。

通过卷积后的大小变化:

输入:

  • n×ci×hi×wi

输出:

  • n×co×ho×wo

其中:ho=(hi+2×padh−kernelh)/strideh+1wo通过同样的方法计算。

 

layers {

   name: "pool1"

    type: POOLING

   bottom: "conv1"

   top: "pool1"

   pooling_param {

       pool: MAX

       kernel_size: 3# poolover a 3x3 region

        stride: 2# step two pixels (in the bottom blob)between pooling regions

    }

}

 

卷积层的重要参数

必需参数:

  • kernel_size (or kernel_h and kernel_w):过滤器的大小

可选参数:

  • pool [default MAX]:pooling的方法,目前有MAX, AVE, 和STOCHASTIC三种方法
  • pad (or pad_h and pad_w) [default 0]:指定在输入的每一遍加上多少个像素
  • stride (or stride_h and stride_w) [default 1]:指定过滤器的步长

通过池化后的大小变化:

输入:

  • n×ci×hi×wi

输出:

  • n×co×ho×wo

其中:ho=(hi+2×padh−kernelh)/strideh+1wo通过同样的方法计算。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值