I've been wondering, why don't you freeze the discriminators weights while using it in the generator loss calculation?
We did freeze the D's weights when calculating the G loss. Only G's weights got updated. See this line.
But for example, in this line: self.loss_G_A = self.criterionGAN(self.netD_A(self.fake_B), True) you don't detach the output of the discriminator and by that the loss can back-propagate to it. Isn't it?
If you detach the output of D, G cannot get gradients. We did calculate the gradients for D, but we didn't update the D's weights.
You're right! I feel so stupid right now lol
Most helpful comment
If you detach the output of D, G cannot get gradients. We did calculate the gradients for D, but we didn't update the D's weights.