aitorzip / PyTorch-SRGAN

A modern PyTorch implementation of SRGAN
https://arxiv.org/abs/1609.04802
GNU General Public License v3.0
359 stars 92 forks source link

Upsample blocks should be added per powers of 2 instead of multiples of 2 #17

Open MohabGhanim opened 3 years ago

MohabGhanim commented 3 years ago

Shouldn't the upsample blocks of the Generator in models.py be added per powers of 2? The current implementation adds them per multiples of 2, which will only work for upsample=2 and upsample=4.

For example, to move from an image of size 128 to an image of size 1024 you need upsample=8 and three upsample blocks: 256,512,1024. which is lg(8)

The current implementation creates four blocks: 256,512,1024,2048 which is 8/2