This command is great. I have now solved this differently and queried whether the value is infinite. I have also fixed the error. I used crossentropy with sigmoid function on my discriminator and afterwards it worked. I assume that my values from the discriminator were unstable at the beginning.