yunjey / pytorch-tutorial

PyTorch Tutorial for Deep Learning Researchers
MIT License
30.13k stars 8.12k forks source link

Train Process so slow #103

Closed khaerulumam42 closed 5 years ago

khaerulumam42 commented 6 years ago

I tried to run train.py in Ubuntu 16.04 which installed cuda 8.0, CUDnn, python 3.5, when i check using torch.cuda.is_available() show output is

True

but when I try to add code to check if cuda available or not in like this if torch.cuda.is_available(): encoder.cuda() decoder.cuda() print("cuda is available") else: print("None of cuda cant use") and the output is

None of cuda cant use

I also add os.environ['CUDA VISIBLE DEVICES'] = '1' after import all packages. Is it cuda unavailable or actually this training consume much times? Thanks for your answer

khaerulumam42 commented 6 years ago

Sorry, I try to run train.py on image captioning

yunjey commented 5 years ago

Try to use the command following CUDA_VISIBLE_DEVICES=1 python main.py ...