akanimax / pro_gan_pytorch

Unofficial PyTorch implementation of the paper titled "Progressive growing of GANs for improved Quality, Stability, and Variation"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

module must have its parameters and buffers on device cuda:0 (device_ids[0]) but found one of them on device: cpu

AEP-WYK opened this issue · comments

when I run the "python generate_samples.py --generator_file "../checkpoint/GAN_GEN_SHADOW_8.pth" --latent_size 512"

Are you trying to do generation of samples on the cpu? While you trained on the GPU. There is a quick fix for this with map_location argument of torch.load. More details here -> https://pytorch.org/docs/1.9.1/generated/torch.load.html.