excuse me, i find we don’t use net.train() and net.eval() in almost all of the gan network,such as wgan, cyclegan,I am very confused.
It depends generally on the model, if these calls are necessary or not.
model.eval() would change the behavior of some layers, such as batchnorm and dropout layers. If these layers are not used (or any other custom layers, which would use the
self.training flag), you wouldn’t need to call
.train() (although it might be seen as a good coding style).