github-pengge / PyTorch-progressive_growing_of_gans

PyTorch implementation of Progressive Growing of GANs for Improved Quality, Stability, and Variation.
580 stars 97 forks source link

Bug related to some objects using/not using GPU #23

Closed NirDiamant closed 5 years ago

NirDiamant commented 5 years ago

When trying to train from scratch, I encounter the following error: x = self.scale * x RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #2 'other'

I believe it has something to do about changing either one of the variable to run on GPU or the other one to run on CPU. yet such change might cause a chain of changes. I would like to know if you had this problem before, and how should I treat it. Thanks a lot.

NirDiamant commented 5 years ago

problem solved by setting scale to run on cuda