I’m using a pre-trained vgg16 as the backbone for a U-Net segmentation model. The code i have is working fine, but I was wondering if there is a way of removing the padding from the feature layers?
In the source code for the pre-trained vgg16 model it seems that the padding is set to 1 https://pytorch.org/docs/stable/_modules/torchvision/models/vgg.html#vgg16 . So i would like to know if there is a way of altering this after importing the pretrained model?
For example in the code:
import torchvision.models as models

vgg16 = models.vgg16()
conv1 = vgg16.features[0]

print(conv1)

Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))

I would like to remove the padding, to reduce the effect of artifacts at the edges.
Thanks in advance for any advice.