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 12.