azadis / MC-GAN

Multi-Content GAN for Few-Shot Font Style Transfer at CVPR 2018
http://bair.berkeley.edu/blog/2018/03/13/mcgan/
Other
446 stars 126 forks source link

when sh train_cGAN.sh, it comes a mistake #1

Closed clscy closed 6 years ago

clscy commented 6 years ago

Hi, Thank you for sharing the code, and when sh train_cGAN.sh, it comes a mistake,

RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at /pytorch/torch/lib/THC/THCGeneral.c:70

my system is ubuntu16.04, CUDA8.0, pytorch0.3.0,torchvision0.2.0,python2.7.12.Thanks.

azadis commented 6 years ago

How many GPUs do you have? What is the output of nvidia-smi? Maybe you should change CUDA_ID to "0" in the bash script. https://github.com/azadis/MC-GAN/blob/master/scripts/train_cGAN.sh#L32

LiberiFatali commented 6 years ago

change CUDA_ID to "0" in the bash script

This works for me. I also need to replace all .cuda(device_id=gpu_ids[0]) with .cuda(gpu_ids[0])

Thank you.