Sorry for not replying sooner.
If I remember correctly the issue ended up being that I was using a deprecated function so it worked on my local machine because it was outdated but not in the updated version.
You can have a look at the new version if you want
https://github.com/Linardos/PyTorch/blob/master/DCGAN.py 16