How to fix GAN class errors

i have a few errors in my GAN class, which i did not have in earlier versions of pytorch.
Can someone show / explain me how to fix them?
Code: Link
Errors: Link
Running on GTX 1060 6GB
Windows 10 - Pycharm
Should be latest version of Pytorch


Could you check the length of your Dataset and make sure it’s larger than the batch size of 64?
Since you are using this values for the batch size and drop_last=True, this line of code:

x = next(iter(data))

will raise the exception for datasets with fewer samples.