tamarott / SinGAN

Official pytorch implementation of the paper: "SinGAN: Learning a Generative Model from a Single Natural Image"
https://tamarott.github.io/SinGAN.htm
Other
3.31k stars 611 forks source link

valid vs same padding? #56

Open qedpi opened 4 years ago

qedpi commented 4 years ago

In config.py: parser.add_argument('--padd_size',type=int,help='net pad size',default=0)#math.floor(opt.ker_size/2)

I'm wondering why you commented out the code for same padding to use valid padding instead? Is this important? (I checked both paper and ICCV talk, and it wasn't mentioned)

tamarott commented 4 years ago

We found that with initial padding we get higher variability on the edges of the generated images, than the case of using zero padding at each conv layer.

See the supplementary material for the full explanation and an experiment which illustrate this: http://openaccess.thecvf.com/content_ICCV_2019/supplemental/Shaham_SinGAN_Learning_a_ICCV_2019_supplemental.pdf