I’m debugging my GAN training script because my generator does not learn anything. I’m using a Subset of my dataset with a single sample, so my generator should learn a constant output equal to that sample. But it doesn’t.
Then I decided to create a dummy_generator that only outputs a Parameter Tensor saved as instance object. So it definitely should learn that tensor to be equal to the only sample um my dataset, but that tensor never changes.
Is my approach correct? Neither my original Generator or my DummyGenerator seems to learn, no matter how big is my learning rate. My discriminator seems to learn fine.
If anybody can help me, I would be very grateful. My complete code is here.
P.S.: It is necessary to download Nsynth dataset to run the complete code.
Thanks for your response. I tried a case similar to your example and changed my generator loss to minimize the difference from the target, instead of aiming discriminator’s output:
This is an indicator that the discrimination is not learning the correct target, right?
Extra info: When I train with the whole dataset again, generator gets stuck with constant output for every input (and MSE loss goes to 1, the maximum value). I don’t know if it’s relevant information, but I don’t understand why my generator would stop in bad local minima like that.