yolo_tensorflow
yolo_tensorflow copied to clipboard
why add tf.pad operator before slim.conv2d?
@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。
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.