tensorflow / nmt

TensorFlow Neural Machine Translation Tutorial
Apache License 2.0
6.37k stars 1.96k forks source link

OOM when using multi gpu #322

Open shuaihuaiyi opened 6 years ago

shuaihuaiyi commented 6 years ago

I found that if i use multi gpu(2 or 3) to train the model, it cannot work and raises OOM error. But if I use single gpu to train it under same parameters except --num_gpus , it works. Am I using multi gpu incorrectly? All the gpus are same with same size of memory.

mcjoshi commented 6 years ago

You can try placing os.environ["CUDA_VISIBLE_DEVICES"] = "2,3" in beginning in nmt.py Works for me :)