Open EricStarer opened 3 years ago
You can do this by setting ${GPU_NUM} and the environment variable CUDA_VISIBLE_DEVICES CUDA_VISIBLE_DEVICES=${GPU id list} ./tools/dist_train.sh ${CONFIG_FILE} ${GPU_NUM}
For example, train a SETR-PUP on Cityscapes dataset with 4 GPUs CUDA_VISIBLE_DEVICES=0,1,2,3 ./tools/dist_train.sh configs/SETR/SETR_PUP_768x768_40k_cityscapes_bs_8.py 4
thanks a lot but I met this error, how to deal with it...
Traceback (most recent call last):
File "/home/jing_liang/anaconda3/envs/zhaoxing/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/jing_liang/anaconda3/envs/zhaoxing/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/jing_liang/anaconda3/envs/zhaoxing/lib/python3.6/site-packages/torch/distributed/launch.py", line 173, in
It may be that your environment is installed incorrectly. It is recommended to check the version of the package or reinstall the environment according to the A from-scratch setup script in the README.
how to select gpu when training with multiple gpus, thanks a lot