Just by skimming through your code, it seems you are freeing the discriminator:


class GAN(nn.Module):
    """GAN model"""
    def __init__(self, generator, discriminator):
        super().__init__()
        self.generator = generator
        self.discriminator = discriminator
        for param in self.discriminator.parameters():
            param.requires_grad = False

    def forward(self, x):
        gen_img = self.generator(x)
        return self.discriminator(gen_img)

Which will not train it. Is this on purpose or were you planning on unfreezing the parameters at some point?