yeah, i have cast my input to cuda
main.py
...
for epoch in range(num_epochs):
        for t, x in enumerate(loader):
            optimizerD.zero_grad()
            optimizerG.zero_grad()
            x.requires_grad_().to(device)
            noise_size = x.shape[0]
            noise = torch.randn(noise_size, 1, 28, 28).requires_grad_().to(device)
...

and when i do this:
main.py
...
device = torch.device('cuda:3')
G = Generator().to(device)
D = Discriminator().to(device)
for param in G.parameters():
    print(type(param.data))
...

I always get ‘<class ‘torch.Tensor’>’, should it be torch.cuda.*?