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+1。wo通过同样的方法计算。
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+1。wo通过同样的方法计算。