Specify a GPU for training check GPU nvidia-smi -L check GPU-1 nvidia-smi -q -i 1 train on GPU-2 CUDA_VISIBLE_DEVICES=2 python test.py