Looking at the PyTorch implementation of DCGAN but also GANs in general…
To me it would seem intuitive to set G in train and D in eval when training G, and vice versa while training D. However, I don’t see this done in any GAN implementations.
Not switching to train/eval mode, it would seem that doing backprop on D(G(noise)) would train both D and G simultaneously. Is this incorrect?
Furthermore, trying to switch between eval and train like I suggested above seems to destabilize the GAN, where D gets 100% accuracy for real samples but 0% accuracy for fake samples.
Maybe .eval() makes D too powerful or makes G too weak.
Maybe freezing D and G with param.requires_grad = False is better? Trying that out seems to make little difference if any to the original training scheme though.