When I was training the GAN, the first iteration worked well, and the second training probably caused an error on the Discriminator side.
The details of the error are as follows. This dimension [3, 48, 3, 3] means the first layer of the Discriminator, but I didn’t use any in place operation.
one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [3, 48, 3, 3]] is at version 2; expected version 1 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!
What is causing this error?
Full Discriminator code is below
https://github.com/KeisukeShimokawa/papers-challenge/blob/master/src/gan/FQGAN/models/FQGAN_64.py