a-PyTorch-Tutorial-to-Super-Resolution
a-PyTorch-Tutorial-to-Super-Resolution copied to clipboard
There is a mistake in the file trian_srgan.py.
To the beginning, thanks a lot to the author. I find a small mistake in the code. I hope the author could correct it. In the Line 192 of the file trian_srgan.py, the input for adversarial_loss_criterion should be sr_discriminated and torch.zeros_like(sr_discriminated).
Hi @xygo567, that is correct, is it not?
In the adversarial loss, we give the wrong labels to the discriminator's loss function in order to obtain gradient information to change the generator's parameters in a way that pushes the discriminator to make wrong predictions. Because we want to the discriminator to be wrong (i.e. fooled by the generator's output).