A question about gan network

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.train() and 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 model.eval() or .train() (although it might be seen as a good coding style).