Thanks for the code.
Unfortunately, set_requires_grad, criterionGAN, the model etc. are all undefined, so that debugging is not possible.
Could you post a (small) executable code snippet to reproduce this error?