AttnGAN icon indicating copy to clipboard operation
AttnGAN copied to clipboard

trainer.py not working with CPU

Open kheimpel opened this issue 6 years ago • 0 comments

Hi,

trainer.py has lots of cuda() calls without asking about the CUDA flag set in config file, so evaluation/training on a CPU is not possible.

I fixed the issue by adding "if cfg.CUDA" loops before every cuda() call and it works just fine: https://github.com/KCool/AttnGAN/blob/master/code/trainer.py

Best KCool

kheimpel avatar Aug 08 '18 12:08 kheimpel