wkentaro / pytorch-fcn

PyTorch Implementation of Fully Convolutional Networks. (Training code to reproduce the original result is available.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why the padding of first conv layer in FCN32s is 100?

msy1412 opened this issue · comments

I wonder why the padding of first conv layer in FCN32s is 100?
FCN32s(
(conv1_1): Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(100, 100))
I am a newcomer in ML.Can you give me some answer? Thank you for advance

It's from the original code at https://github.com/shelhamer/fcn.berkeleyvision.org/blob/master/voc-fcn16s/net.py

emm.....I still don't understand why the padding of first conv layer in FCN32s is 100?

To make sure the network can take input with any size. The pooling layer will down sample the input so there is a limit of the input sample size. With padding, we can take inputs of any size, for example, 16*16 image. At the output, we crop the desired part which has the same shape as input.