assassint2017 / MICCAI-LITS2017

liver segmentation using deep learning
392 stars 91 forks source link

How to train the model on multi GPUs #16

Open XzlXcc opened 4 years ago

XzlXcc commented 4 years ago

We want to train the model on 2 gpus, so we changed the gpu="0, 1" in parameter.py. However, it still use one gpus(gpu0), and we have tried different ways but they do not work. Could you provide any solutions? Thank you.

life-8079 commented 2 years ago

Hi,Could you solve this problem?I changed the gpu="0, 1" in parameter.py.And I changed the "os.environ['CUDA_VISIBLE_DEVICES'] = para.gpu" to "os.environ['CUDA_VISIBLE_DEVICES'] = '0,1'" in train_ds.py and val.py .However, it still use one gpu(gpu0).