shicai / SENet-Caffe

A Caffe Re-Implementation of SENet
BSD 3-Clause "New" or "Revised" License
169 stars 101 forks source link

why your model input is 225 #5

Open lmmcc opened 6 years ago

lmmcc commented 6 years ago

hello, i want to know why your input is 225,while the original one is 224,

shicai commented 6 years ago

simply because i don't like the floor/ceil mode of conv7x7/s2 and pool3x3/s2 in caffe.

for input size = 225:
output size of conv7x7/s2 = (225 - 7 + 2*3) / 2 + 1 = 113,
output size of pool3x3/s2 = (113 - 3) / 2 + 1 = 56.

while for input size = 224:
that is floor((224 - 7 + 2*3) / 2) + 1 = 112, and 
ceil((112 - 3) / 2) + 1 = 56.
lmmcc commented 6 years ago

thanks for your reply,,,sorry for another question,you provide a test prototxt,in your proto,,the bn layer's batch_norm_param is set to eps:1e-4,and have another three params,will it be changed to "use_global_stats:true" in test phase?

shicai commented 6 years ago

yes. it is automatically configured by caffe: in train phase, use_global_stats is false, and in test phase, it is true.