descriptinc / melgan-neurips

GAN-based Mel-Spectrogram Inversion Network for Text-to-Speech Synthesis
MIT License
980 stars 214 forks source link

Why is D_fake calculated in "Train Generator" while D_real is calculated in "Train Discriminator"? #42

Open jdwang125 opened 1 year ago

jdwang125 commented 1 year ago

I believe that D_fake and D_real used in both loss_G and loss_feat should be calculated in the "Train Generator" code block. In the source code, D_fake is the result of netD with the latest parameter updates, while D_real is the result of netD with the previous parameter updates.