junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
23.09k stars 6.32k forks source link

Changed patch discriminator to 70 x 70 patches #1535

Closed aditya-gupta-04 closed 1 year ago

aditya-gupta-04 commented 1 year ago

Patch discriminator was originally 24 x 24 patches due to padw = 1 updated padw = 0 to make 70 x 70 patch size discriminator

Vladimir-Kozub commented 1 year ago

Padding size probably didn't impact on receptive field of discriminator. Receptive field size stems from layers kernel size and stride size. This post provide good explanation of the idea (it consider different architecture, but main idea the same): https://sahiltinky94.medium.com/understanding-patchgan-9f3c8380c207

IMHO, Padding give us ability consider even 70x70 images as several patches, where each have some spacial offset (i.e. patches may partially lying outside the image), and thus we can even pass 24x24 input tensor.