1.Feature map尺寸
对于convolution:
output = (input + 2 * p - k) / s + 1;
对于deconvolution:
output = (input - 1) * s + k - 2 * p;
Reshape层:(改变blob的形状,N,C,W,H)
layer {
name: "reshape"
type: "Reshape"
bottom: "input"
top: "output"
reshape_param {
shape {
dim: 0 # copy the dimension from below
dim: 2
dim: 3
dim: -1 # infer it from the other dimensions
}
}
}
#有一个可选的参数组shape, 用于指定blob数据的各维的值(blob是一个四维的数据:n*c*w*h)。
#dim:0 表示维度不变,即输入和输出是相同的维度。
#dim:2 或 dim:3 将原来的维度变成2或3
#dim:-1 表示由系统自动计算维度。数据的总量不变,系统会根据blob数据的其它三维来自动计算当前维的维度值 。
#假设原数据为:32*3*28*28, 表示32张3通道的28*28的彩色图片
# shape {
# dim: 0 32-32
# dim: 0 3-3
# dim: 14 28-14
# dim: -1 #让其推断出此数值
# }
#输出数据为:32*3*14*56
conv-dilation空洞卷积。
积核为33的,膨胀系数为2,那么,卷积核膨胀之后,卷积核的单边尺寸就变成了2(3-1)+1,即卷积核的尺寸变成了55
inner_product_layer也即全连接层,如下示意图,每个输出都连接到所有的输入。