Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 3.35 KB

File metadata and controls

42 lines (30 loc) · 3.35 KB

Calculate Receptive Field for VGG16.

Refrance

Where K = Kernel size, P= Padding, S= Stride

η_in = Number Of Input Feature, η_out = Number Of Output Feature

R_in = Input receptive Field, R_out = Output Receptive field

J_in = Input Jump, J_out = Output Jump

Layers K P S η_in η_out=
(η_in+2P-K)/S +1
J_in J_out=J_in*S R_in R_out=
R_in + (K-1)*J_in
conv 3 1 1 224 (224+2-3)/1+1=224 1 1 1 1+(3-1)*1=3
conv 3 1 1 224 (224+2-3)/1+1=224 1 1 3 3+(3-1)*1=5
MP_1 2 0 2 224 (224+0-2)/2+1=112 1 2 5 5+(2-1)*2=6
conv 3 1 1 112 (112+2-3)/1+1=112 2 2 6 6+(3-1)*2=10
conv 3 1 1 112 (112+2-3)/1+1=112 2 2 10 10+(3-1)*2=14
MP_2 2 0 2 112 (112+0-2)/2+1=56 2 4 14 14+(2-1)*2=16
conv 3 1 1 56 (56+2-3)/1+1=56 4 4 16 16+(3-1)*4=24
conv 3 1 1 56 (56+2-3)/1+1=56 4 4 24 24+(3-1)*4=32
conv 3 1 1 56 (56+2-3)/1+1=56 4 4 32 32+(3-1)*4=40
MP_3 2 0 2 56 (56+0-2)/2+1=28 4 8 40 40+(2-1)*8=44
conv 3 1 1 28 (28+2-3)/1+1=28 8 8 44 44+(3-1)*8=60
conv 3 1 1 28 (28+2-3)/1+1=28 8 8 60 60+(3-1)*8=76
conv 3 1 1 28 (28+2-3)/1+1=28 8 8 76 76+(3-1)*8=92
MP_4 2 0 2 28 (28+0-2)/2+1=14 8 16 92 92+(2-1)*8=100
conv 3 1 1 14 (14+2-3)/1+1=14 16 16 100 100+(3-1)*16=132
conv 3 1 1 14 (14+2-3)/1+1=14 16 16 132 132+(3-1)*16=164
conv 3 1 1 14 (14+2-3)/1+1=14 16 16 164 164+(3-1)*16=196
MP_5 2 0 2 14 (14+0-2)/2+1=7 16 32 196 196+(2-1)*16=212
FC 7 0 1 7 (7+0-7)/1+1=1 32 32 212 212+(7-1)*32=404

Paper referrnce