donghyeonk/match-lstm

How to use multi-GPU training?

qiqcheng opened this issue · 2 comments

I tried to use os.environ['CUDA_VISIBLE_DEVICES'] = '0,1' in my python script.When running the script from the command line, it simply uses 1 GPU only.I also use nn.DataParallel(model), but get error "'DataParallel' object has no attribute 'req_grad_params'"

Enter the following command on your terminal before running match-LSTM.

export CUDA_VISIBLE_DEVICES="0,1"

thanks,I will try