taesungp / contrastive-unpaired-translation

Contrastive unpaired image-to-image translation, faster and lighter training than cyclegan (ECCV 2020, in PyTorch)
https://taesung.me/ContrastiveUnpairedTranslation/
Other
2.23k stars 417 forks source link

CUDA error on FastCUT #90

Open marcelned opened 3 years ago

marcelned commented 3 years ago

I get the following error:

AttributeError: module 'torch._C' has no attribute '_cuda_setDevice'

after running

python train.py --dataroot ./datasets/grumpifycat --name grumpycat_FastCUT --CUT_mode FastCUT
simon-eda commented 3 years ago

i had the same problem. after following steps train.py runs succesfully.

in base env: conda install -c nvidia cudatoolkit conda install -c anaconda cudnn

than install and activate conda env of https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix install : conda install packaging # (pytorch-CycleGAN-and-pix2pix env is activated)

but i cant tell which step was required to fix the issue

BenoitKAO commented 3 years ago

Thanks for simon-eda.

Do not forget: conda install -y -c conda-forge gputil or pip install gputil

BTW, are there any 3rd party source codes for the evaluating metrics of CycleGAN, CUT, ..., and so on?