感受野:在卷积神经网络CNN中,决定某一层输出结果中一个元素所对应的输入层的区域大小,被称作感受野receptive field。
再通俗点的解释是,feature map上的一个点对应输入图上的区域。
感受野大小的计算
感受野计算时有下面的几个情况需要说明:
(1)第一层卷积层的输出特征图像素的感受野的大小等于滤波器的大小
(2)深层卷积层的感受野大小和它之前所有层的滤波器大小和步长有关系
(3)计算感受野大小时,忽略了图像边缘的影响,即不考虑padding的大小,关于这个疑惑大家可以阅读一下参考文章2的解答进行理解
这里的每一个卷积层还有一个strides的概念,这个strides是之前所有层stride的乘积。
即strides(i) = stride(1) * stride(2) * ...* stride(i-1)
关于感受野大小的计算采用top to down的方式, 即先计算最深层在前一层上的感受野,然后逐渐传递到第一层,使用的公式可以表示如下:
RF = 1 #待计算的feature map上的感受野大小
for layer in (top layer To down layer):
RF = ((RF -1)* stride) + fsize
stride 表示卷积的步长; fsize表示卷积层滤波器的大小
#!/usr/bin/env python
net_struct = {
'vgg': {'net':[[3,1,1],[3,1,1],[2,2,0],[3,1,1],[3,1,1],[2,2,0],[3,1,1],[3,1,1],[3,1,1],
[2,2,0],[3,1,1],[3,1,1],[3,1,1],[2,2,0],[3,1,1],[3,1,1],[3,1,1],[3,1,0],
[3,1,1],[1,1,0],[1,1,0],[3,2,0],[1,1,0],[3,2,0],
[1,1,0],[3,2,0],[1,1,0],[3,2,0],[1,1,0],[4,1,1]],
'name':['conv1_1','conv1_2','pool1','conv2_1','conv2_2','pool2','conv3_1','conv3_2',
'conv3_3', 'pool3','conv4_1','conv4_2','conv4_3_block4','pool4','conv5_1','conv5_2','conv5_3','pool5',
'conv_block6','conv_block7','conv8_1x1','conv3x3_block8','conv9_1x1','conv3x3_block9',
'conv10_1x1', 'conv3x3_block10','conv11_1x1','conv3x3_block11','conv12_1x1','conv4x4_block12']},
}
imsize = 512
def outFromIn(isz, net, layernum):
totstride = 1
insize = isz
outsize=None
for layer in range(layernum):
fsize, stride, pad = net[layer]
outsize = (insize - fsize + 2*pad) / stride + 1
insize = outsize
totstride = totstride * stride
return outsize, totstride
def inFromOut(net, layernum):
RF = 1
for layer in reversed(range(layernum)):
fsize, stride, pad = net[layer]
a=RF
print('RF',a)
RF = ((RF -1)* stride) + fsize
print('stride=%d,fsize=%d,RF=((%d -1)* %d) + %d=%d:'%(stride,fsize,a,stride,fsize,RF))
return RF
if __name__ == '__main__':
print("layer output sizes given image = %dx%d" % (imsize, imsize))
for net in net_struct.keys():
print('************net structrue name is %s**************'% net)
for i in range(len(net_struct[net]['net'])):
p = outFromIn(imsize,net_struct[net]['net'], i+1)
rf = inFromOut(net_struct[net]['net'], i+1)
print("Layer Name = %s, Output size = %3d, Stride = % 3d, RF size = %3d" % (net_struct[net]['name'][i], p[0], p[1], rf))
layer output sizes given image = 512x512
************net structrue name is vgg**************
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
********************
Layer Name = conv1_1, Output size = 512, Stride = 1, RF size = 3
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
********************
Layer Name = conv1_2, Output size = 512, Stride = 1, RF size = 5
RF 1
stride=2,fsize=2,RF=((1 -1)* 2) + 2=2:
RF 2
stride=1,fsize=3,RF=((2 -1)* 1) + 3=4:
RF 4
stride=1,fsize=3,RF=((4 -1)* 1) + 3=6:
********************
Layer Name = pool1, Output size = 256, Stride = 2, RF size = 6
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=2,fsize=2,RF=((3 -1)* 2) + 2=6:
RF 6
stride=1,fsize=3,RF=((6 -1)* 1) + 3=8:
RF 8
stride=1,fsize=3,RF=((8 -1)* 1) + 3=10:
********************
Layer Name = conv2_1, Output size = 256, Stride = 2, RF size = 10
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=2,fsize=2,RF=((5 -1)* 2) + 2=10:
RF 10
stride=1,fsize=3,RF=((10 -1)* 1) + 3=12:
RF 12
stride=1,fsize=3,RF=((12 -1)* 1) + 3=14:
********************
Layer Name = conv2_2, Output size = 256, Stride = 2, RF size = 14
RF 1
stride=2,fsize=2,RF=((1 -1)* 2) + 2=2:
RF 2
stride=1,fsize=3,RF=((2 -1)* 1) + 3=4:
RF 4
stride=1,fsize=3,RF=((4 -1)* 1) + 3=6:
RF 6
stride=2,fsize=2,RF=((6 -1)* 2) + 2=12:
RF 12
stride=1,fsize=3,RF=((12 -1)* 1) + 3=14:
RF 14
stride=1,fsize=3,RF=((14 -1)* 1) + 3=16:
********************
Layer Name = pool2, Output size = 128, Stride = 4, RF size = 16
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=2,fsize=2,RF=((3 -1)* 2) + 2=6:
RF 6
stride=1,fsize=3,RF=((6 -1)* 1) + 3=8:
RF 8
stride=1,fsize=3,RF=((8 -1)* 1) + 3=10:
RF 10
stride=2,fsize=2,RF=((10 -1)* 2) + 2=20:
RF 20
stride=1,fsize=3,RF=((20 -1)* 1) + 3=22:
RF 22
stride=1,fsize=3,RF=((22 -1)* 1) + 3=24:
********************
Layer Name = conv3_1, Output size = 128, Stride = 4, RF size = 24
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=2,fsize=2,RF=((5 -1)* 2) + 2=10:
RF 10
stride=1,fsize=3,RF=((10 -1)* 1) + 3=12:
RF 12
stride=1,fsize=3,RF=((12 -1)* 1) + 3=14:
RF 14
stride=2,fsize=2,RF=((14 -1)* 2) + 2=28:
RF 28
stride=1,fsize=3,RF=((28 -1)* 1) + 3=30:
RF 30
stride=1,fsize=3,RF=((30 -1)* 1) + 3=32:
********************
Layer Name = conv3_2, Output size = 128, Stride = 4, RF size = 32
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=1,fsize=3,RF=((5 -1)* 1) + 3=7:
RF 7
stride=2,fsize=2,RF=((7 -1)* 2) + 2=14:
RF 14
stride=1,fsize=3,RF=((14 -1)* 1) + 3=16:
RF 16
stride=1,fsize=3,RF=((16 -1)* 1) + 3=18:
RF 18
stride=2,fsize=2,RF=((18 -1)* 2) + 2=36:
RF 36
stride=1,fsize=3,RF=((36 -1)* 1) + 3=38:
RF 38
stride=1,fsize=3,RF=((38 -1)* 1) + 3=40:
********************
Layer Name = conv3_3, Output size = 128, Stride = 4, RF size = 40
RF 1
stride=2,fsize=2,RF=((1 -1)* 2) + 2=2:
RF 2
stride=1,fsize=3,RF=((2 -1)* 1) + 3=4:
RF 4
stride=1,fsize=3,RF=((4 -1)* 1) + 3=6:
RF 6
stride=1,fsize=3,RF=((6 -1)* 1) + 3=8:
RF 8
stride=2,fsize=2,RF=((8 -1)* 2) + 2=16:
RF 16
stride=1,fsize=3,RF=((16 -1)* 1) + 3=18:
RF 18
stride=1,fsize=3,RF=((18 -1)* 1) + 3=20:
RF 20
stride=2,fsize=2,RF=((20 -1)* 2) + 2=40:
RF 40
stride=1,fsize=3,RF=((40 -1)* 1) + 3=42:
RF 42
stride=1,fsize=3,RF=((42 -1)* 1) + 3=44:
********************
Layer Name = pool3, Output size = 64, Stride = 8, RF size = 44
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=2,fsize=2,RF=((3 -1)* 2) + 2=6:
RF 6
stride=1,fsize=3,RF=((6 -1)* 1) + 3=8:
RF 8
stride=1,fsize=3,RF=((8 -1)* 1) + 3=10:
RF 10
stride=1,fsize=3,RF=((10 -1)* 1) + 3=12:
RF 12
stride=2,fsize=2,RF=((12 -1)* 2) + 2=24:
RF 24
stride=1,fsize=3,RF=((24 -1)* 1) + 3=26:
RF 26
stride=1,fsize=3,RF=((26 -1)* 1) + 3=28:
RF 28
stride=2,fsize=2,RF=((28 -1)* 2) + 2=56:
RF 56
stride=1,fsize=3,RF=((56 -1)* 1) + 3=58:
RF 58
stride=1,fsize=3,RF=((58 -1)* 1) + 3=60:
********************
Layer Name = conv4_1, Output size = 64, Stride = 8, RF size = 60
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=2,fsize=2,RF=((5 -1)* 2) + 2=10:
RF 10
stride=1,fsize=3,RF=((10 -1)* 1) + 3=12:
RF 12
stride=1,fsize=3,RF=((12 -1)* 1) + 3=14:
RF 14
stride=1,fsize=3,RF=((14 -1)* 1) + 3=16:
RF 16
stride=2,fsize=2,RF=((16 -1)* 2) + 2=32:
RF 32
stride=1,fsize=3,RF=((32 -1)* 1) + 3=34:
RF 34
stride=1,fsize=3,RF=((34 -1)* 1) + 3=36:
RF 36
stride=2,fsize=2,RF=((36 -1)* 2) + 2=72:
RF 72
stride=1,fsize=3,RF=((72 -1)* 1) + 3=74:
RF 74
stride=1,fsize=3,RF=((74 -1)* 1) + 3=76:
********************
Layer Name = conv4_2, Output size = 64, Stride = 8, RF size = 76
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=1,fsize=3,RF=((5 -1)* 1) + 3=7:
RF 7
stride=2,fsize=2,RF=((7 -1)* 2) + 2=14:
RF 14
stride=1,fsize=3,RF=((14 -1)* 1) + 3=16:
RF 16
stride=1,fsize=3,RF=((16 -1)* 1) + 3=18:
RF 18
stride=1,fsize=3,RF=((18 -1)* 1) + 3=20:
RF 20
stride=2,fsize=2,RF=((20 -1)* 2) + 2=40:
RF 40
stride=1,fsize=3,RF=((40 -1)* 1) + 3=42:
RF 42
stride=1,fsize=3,RF=((42 -1)* 1) + 3=44:
RF 44
stride=2,fsize=2,RF=((44 -1)* 2) + 2=88:
RF 88
stride=1,fsize=3,RF=((88 -1)* 1) + 3=90:
RF 90
stride=1,fsize=3,RF=((90 -1)* 1) + 3=92:
********************
Layer Name = conv4_3_block4, Output size = 64, Stride = 8, RF size = 92
RF 1
stride=2,fsize=2,RF=((1 -1)* 2) + 2=2:
RF 2
stride=1,fsize=3,RF=((2 -1)* 1) + 3=4:
RF 4
stride=1,fsize=3,RF=((4 -1)* 1) + 3=6:
RF 6
stride=1,fsize=3,RF=((6 -1)* 1) + 3=8:
RF 8
stride=2,fsize=2,RF=((8 -1)* 2) + 2=16:
RF 16
stride=1,fsize=3,RF=((16 -1)* 1) + 3=18:
RF 18
stride=1,fsize=3,RF=((18 -1)* 1) + 3=20:
RF 20
stride=1,fsize=3,RF=((20 -1)* 1) + 3=22:
RF 22
stride=2,fsize=2,RF=((22 -1)* 2) + 2=44:
RF 44
stride=1,fsize=3,RF=((44 -1)* 1) + 3=46:
RF 46
stride=1,fsize=3,RF=((46 -1)* 1) + 3=48:
RF 48
stride=2,fsize=2,RF=((48 -1)* 2) + 2=96:
RF 96
stride=1,fsize=3,RF=((96 -1)* 1) + 3=98:
RF 98
stride=1,fsize=3,RF=((98 -1)* 1) + 3=100:
********************
Layer Name = pool4, Output size = 32, Stride = 16, RF size = 100
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=2,fsize=2,RF=((3 -1)* 2) + 2=6:
RF 6
stride=1,fsize=3,RF=((6 -1)* 1) + 3=8:
RF 8
stride=1,fsize=3,RF=((8 -1)* 1) + 3=10:
RF 10
stride=1,fsize=3,RF=((10 -1)* 1) + 3=12:
RF 12
stride=2,fsize=2,RF=((12 -1)* 2) + 2=24:
RF 24
stride=1,fsize=3,RF=((24 -1)* 1) + 3=26:
RF 26
stride=1,fsize=3,RF=((26 -1)* 1) + 3=28:
RF 28
stride=1,fsize=3,RF=((28 -1)* 1) + 3=30:
RF 30
stride=2,fsize=2,RF=((30 -1)* 2) + 2=60:
RF 60
stride=1,fsize=3,RF=((60 -1)* 1) + 3=62:
RF 62
stride=1,fsize=3,RF=((62 -1)* 1) + 3=64:
RF 64
stride=2,fsize=2,RF=((64 -1)* 2) + 2=128:
RF 128
stride=1,fsize=3,RF=((128 -1)* 1) + 3=130:
RF 130
stride=1,fsize=3,RF=((130 -1)* 1) + 3=132:
********************
Layer Name = conv5_1, Output size = 32, Stride = 16, RF size = 132
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=2,fsize=2,RF=((5 -1)* 2) + 2=10:
RF 10
stride=1,fsize=3,RF=((10 -1)* 1) + 3=12:
RF 12
stride=1,fsize=3,RF=((12 -1)* 1) + 3=14:
RF 14
stride=1,fsize=3,RF=((14 -1)* 1) + 3=16:
RF 16
stride=2,fsize=2,RF=((16 -1)* 2) + 2=32:
RF 32
stride=1,fsize=3,RF=((32 -1)* 1) + 3=34:
RF 34
stride=1,fsize=3,RF=((34 -1)* 1) + 3=36:
RF 36
stride=1,fsize=3,RF=((36 -1)* 1) + 3=38:
RF 38
stride=2,fsize=2,RF=((38 -1)* 2) + 2=76:
RF 76
stride=1,fsize=3,RF=((76 -1)* 1) + 3=78:
RF 78
stride=1,fsize=3,RF=((78 -1)* 1) + 3=80:
RF 80
stride=2,fsize=2,RF=((80 -1)* 2) + 2=160:
RF 160
stride=1,fsize=3,RF=((160 -1)* 1) + 3=162:
RF 162
stride=1,fsize=3,RF=((162 -1)* 1) + 3=164:
********************
Layer Name = conv5_2, Output size = 32, Stride = 16, RF size = 164
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=1,fsize=3,RF=((5 -1)* 1) + 3=7:
RF 7
stride=2,fsize=2,RF=((7 -1)* 2) + 2=14:
RF 14
stride=1,fsize=3,RF=((14 -1)* 1) + 3=16:
RF 16
stride=1,fsize=3,RF=((16 -1)* 1) + 3=18:
RF 18
stride=1,fsize=3,RF=((18 -1)* 1) + 3=20:
RF 20
stride=2,fsize=2,RF=((20 -1)* 2) + 2=40:
RF 40
stride=1,fsize=3,RF=((40 -1)* 1) + 3=42:
RF 42
stride=1,fsize=3,RF=((42 -1)* 1) + 3=44:
RF 44
stride=1,fsize=3,RF=((44 -1)* 1) + 3=46:
RF 46
stride=2,fsize=2,RF=((46 -1)* 2) + 2=92:
RF 92
stride=1,fsize=3,RF=((92 -1)* 1) + 3=94:
RF 94
stride=1,fsize=3,RF=((94 -1)* 1) + 3=96:
RF 96
stride=2,fsize=2,RF=((96 -1)* 2) + 2=192:
RF 192
stride=1,fsize=3,RF=((192 -1)* 1) + 3=194:
RF 194
stride=1,fsize=3,RF=((194 -1)* 1) + 3=196:
********************
Layer Name = conv5_3, Output size = 32, Stride = 16, RF size = 196
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=1,fsize=3,RF=((5 -1)* 1) + 3=7:
RF 7
stride=1,fsize=3,RF=((7 -1)* 1) + 3=9:
RF 9
stride=2,fsize=2,RF=((9 -1)* 2) + 2=18:
RF 18
stride=1,fsize=3,RF=((18 -1)* 1) + 3=20:
RF 20
stride=1,fsize=3,RF=((20 -1)* 1) + 3=22:
RF 22
stride=1,fsize=3,RF=((22 -1)* 1) + 3=24:
RF 24
stride=2,fsize=2,RF=((24 -1)* 2) + 2=48:
RF 48
stride=1,fsize=3,RF=((48 -1)* 1) + 3=50:
RF 50
stride=1,fsize=3,RF=((50 -1)* 1) + 3=52:
RF 52
stride=1,fsize=3,RF=((52 -1)* 1) + 3=54:
RF 54
stride=2,fsize=2,RF=((54 -1)* 2) + 2=108:
RF 108
stride=1,fsize=3,RF=((108 -1)* 1) + 3=110:
RF 110
stride=1,fsize=3,RF=((110 -1)* 1) + 3=112:
RF 112
stride=2,fsize=2,RF=((112 -1)* 2) + 2=224:
RF 224
stride=1,fsize=3,RF=((224 -1)* 1) + 3=226:
RF 226
stride=1,fsize=3,RF=((226 -1)* 1) + 3=228:
********************
Layer Name = pool5, Output size = 30, Stride = 16, RF size = 228
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=1,fsize=3,RF=((5 -1)* 1) + 3=7:
RF 7
stride=1,fsize=3,RF=((7 -1)* 1) + 3=9:
RF 9
stride=1,fsize=3,RF=((9 -1)* 1) + 3=11:
RF 11
stride=2,fsize=2,RF=((11 -1)* 2) + 2=22:
RF 22
stride=1,fsize=3,RF=((22 -1)* 1) + 3=24:
RF 24
stride=1,fsize=3,RF=((24 -1)* 1) + 3=26:
RF 26
stride=1,fsize=3,RF=((26 -1)* 1) + 3=28:
RF 28
stride=2,fsize=2,RF=((28 -1)* 2) + 2=56:
RF 56
stride=1,fsize=3,RF=((56 -1)* 1) + 3=58:
RF 58
stride=1,fsize=3,RF=((58 -1)* 1) + 3=60:
RF 60
stride=1,fsize=3,RF=((60 -1)* 1) + 3=62:
RF 62
stride=2,fsize=2,RF=((62 -1)* 2) + 2=124:
RF 124
stride=1,fsize=3,RF=((124 -1)* 1) + 3=126:
RF 126
stride=1,fsize=3,RF=((126 -1)* 1) + 3=128:
RF 128
stride=2,fsize=2,RF=((128 -1)* 2) + 2=256:
RF 256
stride=1,fsize=3,RF=((256 -1)* 1) + 3=258:
RF 258
stride=1,fsize=3,RF=((258 -1)* 1) + 3=260:
********************
Layer Name = conv_block6, Output size = 30, Stride = 16, RF size = 260
RF 1
stride=1,fsize=1,RF=((1 -1)* 1) + 1=1:
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=1,fsize=3,RF=((5 -1)* 1) + 3=7:
RF 7
stride=1,fsize=3,RF=((7 -1)* 1) + 3=9:
RF 9
stride=1,fsize=3,RF=((9 -1)* 1) + 3=11:
RF 11
stride=2,fsize=2,RF=((11 -1)* 2) + 2=22:
RF 22
stride=1,fsize=3,RF=((22 -1)* 1) + 3=24:
RF 24
stride=1,fsize=3,RF=((24 -1)* 1) + 3=26:
RF 26
stride=1,fsize=3,RF=((26 -1)* 1) + 3=28:
RF 28
stride=2,fsize=2,RF=((28 -1)* 2) + 2=56:
RF 56
stride=1,fsize=3,RF=((56 -1)* 1) + 3=58:
RF 58
stride=1,fsize=3,RF=((58 -1)* 1) + 3=60:
RF 60
stride=1,fsize=3,RF=((60 -1)* 1) + 3=62:
RF 62
stride=2,fsize=2,RF=((62 -1)* 2) + 2=124:
RF 124
stride=1,fsize=3,RF=((124 -1)* 1) + 3=126:
RF 126
stride=1,fsize=3,RF=((126 -1)* 1) + 3=128:
RF 128
stride=2,fsize=2,RF=((128 -1)* 2) + 2=256:
RF 256
stride=1,fsize=3,RF=((256 -1)* 1) + 3=258:
RF 258
stride=1,fsize=3,RF=((258 -1)* 1) + 3=260:
********************
Layer Name = conv_block7, Output size = 30, Stride = 16, RF size = 260
RF 1
stride=1,fsize=1,RF=((1 -1)* 1) + 1=1:
RF 1
stride=1,fsize=1,RF=((1 -1)* 1) + 1=1:
RF 1
stride=1,fsize=3,RF=((1 -1)* 1) + 3=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=1,fsize=3,RF=((5 -1)* 1) + 3=7:
RF 7
stride=1,fsize=3,RF=((7 -1)* 1) + 3=9:
RF 9
stride=1,fsize=3,RF=((9 -1)* 1) + 3=11:
RF 11
stride=2,fsize=2,RF=((11 -1)* 2) + 2=22:
RF 22
stride=1,fsize=3,RF=((22 -1)* 1) + 3=24:
RF 24
stride=1,fsize=3,RF=((24 -1)* 1) + 3=26:
RF 26
stride=1,fsize=3,RF=((26 -1)* 1) + 3=28:
RF 28
stride=2,fsize=2,RF=((28 -1)* 2) + 2=56:
RF 56
stride=1,fsize=3,RF=((56 -1)* 1) + 3=58:
RF 58
stride=1,fsize=3,RF=((58 -1)* 1) + 3=60:
RF 60
stride=1,fsize=3,RF=((60 -1)* 1) + 3=62:
RF 62
stride=2,fsize=2,RF=((62 -1)* 2) + 2=124:
RF 124
stride=1,fsize=3,RF=((124 -1)* 1) + 3=126:
RF 126
stride=1,fsize=3,RF=((126 -1)* 1) + 3=128:
RF 128
stride=2,fsize=2,RF=((128 -1)* 2) + 2=256:
RF 256
stride=1,fsize=3,RF=((256 -1)* 1) + 3=258:
RF 258
stride=1,fsize=3,RF=((258 -1)* 1) + 3=260:
********************
Layer Name = conv8_1x1, Output size = 30, Stride = 16, RF size = 260
RF 1
stride=2,fsize=3,RF=((1 -1)* 2) + 3=3:
RF 3
stride=1,fsize=1,RF=((3 -1)* 1) + 1=3:
RF 3
stride=1,fsize=1,RF=((3 -1)* 1) + 1=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=1,fsize=3,RF=((5 -1)* 1) + 3=7:
RF 7
stride=1,fsize=3,RF=((7 -1)* 1) + 3=9:
RF 9
stride=1,fsize=3,RF=((9 -1)* 1) + 3=11:
RF 11
stride=1,fsize=3,RF=((11 -1)* 1) + 3=13:
RF 13
stride=2,fsize=2,RF=((13 -1)* 2) + 2=26:
RF 26
stride=1,fsize=3,RF=((26 -1)* 1) + 3=28:
RF 28
stride=1,fsize=3,RF=((28 -1)* 1) + 3=30:
RF 30
stride=1,fsize=3,RF=((30 -1)* 1) + 3=32:
RF 32
stride=2,fsize=2,RF=((32 -1)* 2) + 2=64:
RF 64
stride=1,fsize=3,RF=((64 -1)* 1) + 3=66:
RF 66
stride=1,fsize=3,RF=((66 -1)* 1) + 3=68:
RF 68
stride=1,fsize=3,RF=((68 -1)* 1) + 3=70:
RF 70
stride=2,fsize=2,RF=((70 -1)* 2) + 2=140:
RF 140
stride=1,fsize=3,RF=((140 -1)* 1) + 3=142:
RF 142
stride=1,fsize=3,RF=((142 -1)* 1) + 3=144:
RF 144
stride=2,fsize=2,RF=((144 -1)* 2) + 2=288:
RF 288
stride=1,fsize=3,RF=((288 -1)* 1) + 3=290:
RF 290
stride=1,fsize=3,RF=((290 -1)* 1) + 3=292:
********************
Layer Name = conv3x3_block8, Output size = 14, Stride = 32, RF size = 292
RF 1
stride=1,fsize=1,RF=((1 -1)* 1) + 1=1:
RF 1
stride=2,fsize=3,RF=((1 -1)* 2) + 3=3:
RF 3
stride=1,fsize=1,RF=((3 -1)* 1) + 1=3:
RF 3
stride=1,fsize=1,RF=((3 -1)* 1) + 1=3:
RF 3
stride=1,fsize=3,RF=((3 -1)* 1) + 3=5:
RF 5
stride=1,fsize=3,RF=((5 -1)* 1) + 3=7:
RF 7
stride=1,fsize=3,RF=((7 -1)* 1) + 3=9:
RF 9
stride=1,fsize=3,RF=((9 -1)* 1) + 3=11:
RF 11
stride=1,fsize=3,RF=((11 -1)* 1) + 3=13:
RF 13
stride=2,fsize=2,RF=((13 -1)* 2) + 2=26:
RF 26
stride=1,fsize=3,RF=((26 -1)* 1) + 3=28:
RF 28
stride=1,fsize=3,RF=((28 -1)* 1) + 3=30:
RF 30
stride=1,fsize=3,RF=((30 -1)* 1) + 3=32:
RF 32
stride=2,fsize=2,RF=((32 -1)* 2) + 2=64:
RF 64
stride=1,fsize=3,RF=((64 -1)* 1) + 3=66:
RF 66
stride=1,fsize=3,RF=((66 -1)* 1) + 3=68:
RF 68
stride=1,fsize=3,RF=((68 -1)* 1) + 3=70:
RF 70
stride=2,fsize=2,RF=((70 -1)* 2) + 2=140:
RF 140
stride=1,fsize=3,RF=((140 -1)* 1) + 3=142:
RF 142
stride=1,fsize=3,RF=((142 -1)* 1) + 3=144:
RF 144
stride=2,fsize=2,RF=((144 -1)* 2) + 2=288:
RF 288
stride=1,fsize=3,RF=((288 -1)* 1) + 3=290:
RF 290
stride=1,fsize=3,RF=((290 -1)* 1) + 3=292:
********************
Layer Name = conv9_1x1, Output size = 14, Stride = 32, RF size = 292
RF 1
stride=2,fsize=3,RF=((1 -1)* 2) + 3=3:
RF 3
stride=1,fsize=1,RF=((3 -1)* 1) + 1=3:
RF 3
stride=2,fsize=3,RF=((3 -1)* 2) + 3=7:
RF 7
stride=1,fsize=1,RF=((7 -1)* 1) + 1=7:
RF 7
stride=1,fsize=1,RF=((7 -1)* 1) + 1=7:
RF 7
stride=1,fsize=3,RF=((7 -1)* 1) + 3=9:
RF 9
stride=1,fsize=3,RF=((9 -1)* 1) + 3=11:
RF 11
stride=1,fsize=3,RF=((11 -1)* 1) + 3=13:
RF 13
stride=1,fsize=3,RF=((13 -1)* 1) + 3=15:
RF 15
stride=1,fsize=3,RF=((15 -1)* 1) + 3=17:
RF 17
stride=2,fsize=2,RF=((17 -1)* 2) + 2=34:
RF 34
stride=1,fsize=3,RF=((34 -1)* 1) + 3=36:
RF 36
stride=1,fsize=3,RF=((36 -1)* 1) + 3=38:
RF 38
stride=1,fsize=3,RF=((38 -1)* 1) + 3=40:
RF 40
stride=2,fsize=2,RF=((40 -1)* 2) + 2=80:
RF 80
stride=1,fsize=3,RF=((80 -1)* 1) + 3=82:
RF 82
stride=1,fsize=3,RF=((82 -1)* 1) + 3=84:
RF 84
stride=1,fsize=3,RF=((84 -1)* 1) + 3=86:
RF 86
stride=2,fsize=2,RF=((86 -1)* 2) + 2=172:
RF 172
stride=1,fsize=3,RF=((172 -1)* 1) + 3=174:
RF 174
stride=1,fsize=3,RF=((174 -1)* 1) + 3=176:
RF 176
stride=2,fsize=2,RF=((176 -1)* 2) + 2=352:
RF 352
stride=1,fsize=3,RF=((352 -1)* 1) + 3=354:
RF 354
stride=1,fsize=3,RF=((354 -1)* 1) + 3=356:
********************
Layer Name = conv3x3_block9, Output size = 6, Stride = 64, RF size = 356
RF 1
stride=1,fsize=1,RF=((1 -1)* 1) + 1=1:
RF 1
stride=2,fsize=3,RF=((1 -1)* 2) + 3=3:
RF 3
stride=1,fsize=1,RF=((3 -1)* 1) + 1=3:
RF 3
stride=2,fsize=3,RF=((3 -1)* 2) + 3=7:
RF 7
stride=1,fsize=1,RF=((7 -1)* 1) + 1=7:
RF 7
stride=1,fsize=1,RF=((7 -1)* 1) + 1=7:
RF 7
stride=1,fsize=3,RF=((7 -1)* 1) + 3=9:
RF 9
stride=1,fsize=3,RF=((9 -1)* 1) + 3=11:
RF 11
stride=1,fsize=3,RF=((11 -1)* 1) + 3=13:
RF 13
stride=1,fsize=3,RF=((13 -1)* 1) + 3=15:
RF 15
stride=1,fsize=3,RF=((15 -1)* 1) + 3=17:
RF 17
stride=2,fsize=2,RF=((17 -1)* 2) + 2=34:
RF 34
stride=1,fsize=3,RF=((34 -1)* 1) + 3=36:
RF 36
stride=1,fsize=3,RF=((36 -1)* 1) + 3=38:
RF 38
stride=1,fsize=3,RF=((38 -1)* 1) + 3=40:
RF 40
stride=2,fsize=2,RF=((40 -1)* 2) + 2=80:
RF 80
stride=1,fsize=3,RF=((80 -1)* 1) + 3=82:
RF 82
stride=1,fsize=3,RF=((82 -1)* 1) + 3=84:
RF 84
stride=1,fsize=3,RF=((84 -1)* 1) + 3=86:
RF 86
stride=2,fsize=2,RF=((86 -1)* 2) + 2=172:
RF 172
stride=1,fsize=3,RF=((172 -1)* 1) + 3=174:
RF 174
stride=1,fsize=3,RF=((174 -1)* 1) + 3=176:
RF 176
stride=2,fsize=2,RF=((176 -1)* 2) + 2=352:
RF 352
stride=1,fsize=3,RF=((352 -1)* 1) + 3=354:
RF 354
stride=1,fsize=3,RF=((354 -1)* 1) + 3=356:
********************
Layer Name = conv10_1x1, Output size = 6, Stride = 64, RF size = 356
RF 1
stride=2,fsize=3,RF=((1 -1)* 2) + 3=3:
RF 3
stride=1,fsize=1,RF=((3 -1)* 1) + 1=3:
RF 3
stride=2,fsize=3,RF=((3 -1)* 2) + 3=7:
RF 7
stride=1,fsize=1,RF=((7 -1)* 1) + 1=7:
RF 7
stride=2,fsize=3,RF=((7 -1)* 2) + 3=15:
RF 15
stride=1,fsize=1,RF=((15 -1)* 1) + 1=15:
RF 15
stride=1,fsize=1,RF=((15 -1)* 1) + 1=15:
RF 15
stride=1,fsize=3,RF=((15 -1)* 1) + 3=17:
RF 17
stride=1,fsize=3,RF=((17 -1)* 1) + 3=19:
RF 19
stride=1,fsize=3,RF=((19 -1)* 1) + 3=21:
RF 21
stride=1,fsize=3,RF=((21 -1)* 1) + 3=23:
RF 23
stride=1,fsize=3,RF=((23 -1)* 1) + 3=25:
RF 25
stride=2,fsize=2,RF=((25 -1)* 2) + 2=50:
RF 50
stride=1,fsize=3,RF=((50 -1)* 1) + 3=52:
RF 52
stride=1,fsize=3,RF=((52 -1)* 1) + 3=54:
RF 54
stride=1,fsize=3,RF=((54 -1)* 1) + 3=56:
RF 56
stride=2,fsize=2,RF=((56 -1)* 2) + 2=112:
RF 112
stride=1,fsize=3,RF=((112 -1)* 1) + 3=114:
RF 114
stride=1,fsize=3,RF=((114 -1)* 1) + 3=116:
RF 116
stride=1,fsize=3,RF=((116 -1)* 1) + 3=118:
RF 118
stride=2,fsize=2,RF=((118 -1)* 2) + 2=236:
RF 236
stride=1,fsize=3,RF=((236 -1)* 1) + 3=238:
RF 238
stride=1,fsize=3,RF=((238 -1)* 1) + 3=240:
RF 240
stride=2,fsize=2,RF=((240 -1)* 2) + 2=480:
RF 480
stride=1,fsize=3,RF=((480 -1)* 1) + 3=482:
RF 482
stride=1,fsize=3,RF=((482 -1)* 1) + 3=484:
********************
Layer Name = conv3x3_block10, Output size = 2, Stride = 128, RF size = 484
RF 1
stride=1,fsize=1,RF=((1 -1)* 1) + 1=1:
RF 1
stride=2,fsize=3,RF=((1 -1)* 2) + 3=3:
RF 3
stride=1,fsize=1,RF=((3 -1)* 1) + 1=3:
RF 3
stride=2,fsize=3,RF=((3 -1)* 2) + 3=7:
RF 7
stride=1,fsize=1,RF=((7 -1)* 1) + 1=7:
RF 7
stride=2,fsize=3,RF=((7 -1)* 2) + 3=15:
RF 15
stride=1,fsize=1,RF=((15 -1)* 1) + 1=15:
RF 15
stride=1,fsize=1,RF=((15 -1)* 1) + 1=15:
RF 15
stride=1,fsize=3,RF=((15 -1)* 1) + 3=17:
RF 17
stride=1,fsize=3,RF=((17 -1)* 1) + 3=19:
RF 19
stride=1,fsize=3,RF=((19 -1)* 1) + 3=21:
RF 21
stride=1,fsize=3,RF=((21 -1)* 1) + 3=23:
RF 23
stride=1,fsize=3,RF=((23 -1)* 1) + 3=25:
RF 25
stride=2,fsize=2,RF=((25 -1)* 2) + 2=50:
RF 50
stride=1,fsize=3,RF=((50 -1)* 1) + 3=52:
RF 52
stride=1,fsize=3,RF=((52 -1)* 1) + 3=54:
RF 54
stride=1,fsize=3,RF=((54 -1)* 1) + 3=56:
RF 56
stride=2,fsize=2,RF=((56 -1)* 2) + 2=112:
RF 112
stride=1,fsize=3,RF=((112 -1)* 1) + 3=114:
RF 114
stride=1,fsize=3,RF=((114 -1)* 1) + 3=116:
RF 116
stride=1,fsize=3,RF=((116 -1)* 1) + 3=118:
RF 118
stride=2,fsize=2,RF=((118 -1)* 2) + 2=236:
RF 236
stride=1,fsize=3,RF=((236 -1)* 1) + 3=238:
RF 238
stride=1,fsize=3,RF=((238 -1)* 1) + 3=240:
RF 240
stride=2,fsize=2,RF=((240 -1)* 2) + 2=480:
RF 480
stride=1,fsize=3,RF=((480 -1)* 1) + 3=482:
RF 482
stride=1,fsize=3,RF=((482 -1)* 1) + 3=484:
********************
Layer Name = conv11_1x1, Output size = 2, Stride = 128, RF size = 484
RF 1
stride=2,fsize=3,RF=((1 -1)* 2) + 3=3:
RF 3
stride=1,fsize=1,RF=((3 -1)* 1) + 1=3:
RF 3
stride=2,fsize=3,RF=((3 -1)* 2) + 3=7:
RF 7
stride=1,fsize=1,RF=((7 -1)* 1) + 1=7:
RF 7
stride=2,fsize=3,RF=((7 -1)* 2) + 3=15:
RF 15
stride=1,fsize=1,RF=((15 -1)* 1) + 1=15:
RF 15
stride=2,fsize=3,RF=((15 -1)* 2) + 3=31:
RF 31
stride=1,fsize=1,RF=((31 -1)* 1) + 1=31:
RF 31
stride=1,fsize=1,RF=((31 -1)* 1) + 1=31:
RF 31
stride=1,fsize=3,RF=((31 -1)* 1) + 3=33:
RF 33
stride=1,fsize=3,RF=((33 -1)* 1) + 3=35:
RF 35
stride=1,fsize=3,RF=((35 -1)* 1) + 3=37:
RF 37
stride=1,fsize=3,RF=((37 -1)* 1) + 3=39:
RF 39
stride=1,fsize=3,RF=((39 -1)* 1) + 3=41:
RF 41
stride=2,fsize=2,RF=((41 -1)* 2) + 2=82:
RF 82
stride=1,fsize=3,RF=((82 -1)* 1) + 3=84:
RF 84
stride=1,fsize=3,RF=((84 -1)* 1) + 3=86:
RF 86
stride=1,fsize=3,RF=((86 -1)* 1) + 3=88:
RF 88
stride=2,fsize=2,RF=((88 -1)* 2) + 2=176:
RF 176
stride=1,fsize=3,RF=((176 -1)* 1) + 3=178:
RF 178
stride=1,fsize=3,RF=((178 -1)* 1) + 3=180:
RF 180
stride=1,fsize=3,RF=((180 -1)* 1) + 3=182:
RF 182
stride=2,fsize=2,RF=((182 -1)* 2) + 2=364:
RF 364
stride=1,fsize=3,RF=((364 -1)* 1) + 3=366:
RF 366
stride=1,fsize=3,RF=((366 -1)* 1) + 3=368:
RF 368
stride=2,fsize=2,RF=((368 -1)* 2) + 2=736:
RF 736
stride=1,fsize=3,RF=((736 -1)* 1) + 3=738:
RF 738
stride=1,fsize=3,RF=((738 -1)* 1) + 3=740:
********************
Layer Name = conv3x3_block11, Output size = 0, Stride = 256, RF size = 740
RF 1
stride=1,fsize=1,RF=((1 -1)* 1) + 1=1:
RF 1
stride=2,fsize=3,RF=((1 -1)* 2) + 3=3:
RF 3
stride=1,fsize=1,RF=((3 -1)* 1) + 1=3:
RF 3
stride=2,fsize=3,RF=((3 -1)* 2) + 3=7:
RF 7
stride=1,fsize=1,RF=((7 -1)* 1) + 1=7:
RF 7
stride=2,fsize=3,RF=((7 -1)* 2) + 3=15:
RF 15
stride=1,fsize=1,RF=((15 -1)* 1) + 1=15:
RF 15
stride=2,fsize=3,RF=((15 -1)* 2) + 3=31:
RF 31
stride=1,fsize=1,RF=((31 -1)* 1) + 1=31:
RF 31
stride=1,fsize=1,RF=((31 -1)* 1) + 1=31:
RF 31
stride=1,fsize=3,RF=((31 -1)* 1) + 3=33:
RF 33
stride=1,fsize=3,RF=((33 -1)* 1) + 3=35:
RF 35
stride=1,fsize=3,RF=((35 -1)* 1) + 3=37:
RF 37
stride=1,fsize=3,RF=((37 -1)* 1) + 3=39:
RF 39
stride=1,fsize=3,RF=((39 -1)* 1) + 3=41:
RF 41
stride=2,fsize=2,RF=((41 -1)* 2) + 2=82:
RF 82
stride=1,fsize=3,RF=((82 -1)* 1) + 3=84:
RF 84
stride=1,fsize=3,RF=((84 -1)* 1) + 3=86:
RF 86
stride=1,fsize=3,RF=((86 -1)* 1) + 3=88:
RF 88
stride=2,fsize=2,RF=((88 -1)* 2) + 2=176:
RF 176
stride=1,fsize=3,RF=((176 -1)* 1) + 3=178:
RF 178
stride=1,fsize=3,RF=((178 -1)* 1) + 3=180:
RF 180
stride=1,fsize=3,RF=((180 -1)* 1) + 3=182:
RF 182
stride=2,fsize=2,RF=((182 -1)* 2) + 2=364:
RF 364
stride=1,fsize=3,RF=((364 -1)* 1) + 3=366:
RF 366
stride=1,fsize=3,RF=((366 -1)* 1) + 3=368:
RF 368
stride=2,fsize=2,RF=((368 -1)* 2) + 2=736:
RF 736
stride=1,fsize=3,RF=((736 -1)* 1) + 3=738:
RF 738
stride=1,fsize=3,RF=((738 -1)* 1) + 3=740:
********************
Layer Name = conv12_1x1, Output size = 0, Stride = 256, RF size = 740
RF 1
stride=1,fsize=4,RF=((1 -1)* 1) + 4=4:
RF 4
stride=1,fsize=1,RF=((4 -1)* 1) + 1=4:
RF 4
stride=2,fsize=3,RF=((4 -1)* 2) + 3=9:
RF 9
stride=1,fsize=1,RF=((9 -1)* 1) + 1=9:
RF 9
stride=2,fsize=3,RF=((9 -1)* 2) + 3=19:
RF 19
stride=1,fsize=1,RF=((19 -1)* 1) + 1=19:
RF 19
stride=2,fsize=3,RF=((19 -1)* 2) + 3=39:
RF 39
stride=1,fsize=1,RF=((39 -1)* 1) + 1=39:
RF 39
stride=2,fsize=3,RF=((39 -1)* 2) + 3=79:
RF 79
stride=1,fsize=1,RF=((79 -1)* 1) + 1=79:
RF 79
stride=1,fsize=1,RF=((79 -1)* 1) + 1=79:
RF 79
stride=1,fsize=3,RF=((79 -1)* 1) + 3=81:
RF 81
stride=1,fsize=3,RF=((81 -1)* 1) + 3=83:
RF 83
stride=1,fsize=3,RF=((83 -1)* 1) + 3=85:
RF 85
stride=1,fsize=3,RF=((85 -1)* 1) + 3=87:
RF 87
stride=1,fsize=3,RF=((87 -1)* 1) + 3=89:
RF 89
stride=2,fsize=2,RF=((89 -1)* 2) + 2=178:
RF 178
stride=1,fsize=3,RF=((178 -1)* 1) + 3=180:
RF 180
stride=1,fsize=3,RF=((180 -1)* 1) + 3=182:
RF 182
stride=1,fsize=3,RF=((182 -1)* 1) + 3=184:
RF 184
stride=2,fsize=2,RF=((184 -1)* 2) + 2=368:
RF 368
stride=1,fsize=3,RF=((368 -1)* 1) + 3=370:
RF 370
stride=1,fsize=3,RF=((370 -1)* 1) + 3=372:
RF 372
stride=1,fsize=3,RF=((372 -1)* 1) + 3=374:
RF 374
stride=2,fsize=2,RF=((374 -1)* 2) + 2=748:
RF 748
stride=1,fsize=3,RF=((748 -1)* 1) + 3=750:
RF 750
stride=1,fsize=3,RF=((750 -1)* 1) + 3=752:
RF 752
stride=2,fsize=2,RF=((752 -1)* 2) + 2=1504:
RF 1504
stride=1,fsize=3,RF=((1504 -1)* 1) + 3=1506:
RF 1506
stride=1,fsize=3,RF=((1506 -1)* 1) + 3=1508:
********************
Layer Name = conv4x4_block12, Output size = 0, Stride = 256, RF size = 1508
还有一种简便算法
![]() | |
当前层的感受野=(fsize-1)*stride_last+RF_last
例如:
conv1_2RF=(3-1)*1+3=5