yolo_tensorflow icon indicating copy to clipboard operation
yolo_tensorflow copied to clipboard

why add tf.pad operator before slim.conv2d?

Open aoguren opened this issue 7 years ago • 1 comments

@hizhangp net = tf.pad(images, np.array([[0, 0], [3, 3], [3, 3], [0, 0]]), name='pad_1') net = slim.conv2d(net, 64, 7, 2, padding='VALID', scope='conv_2') I don't understand why the tf.pad was added before slim.conv2d, furthermore,it expands the size of the network。

aoguren avatar Jan 24 '18 08:01 aoguren

Because the parameter ' padding='VALID' ' in slim.conv2d. In order to make the output size be same as the input, and considering the conv filter size is 7*7, we should pad the images 3 pixels in four sides of the image.

CV-Bowen avatar Jul 09 '18 14:07 CV-Bowen