RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: PyTorch error

It’s unclear what exactly is causing this error, since you haven’t posted a code snippet to reproduce this issue.
However, based on the description and since you are using a GAN, you might be facing a similar issue as described here.