PersFormer_3DLane icon indicating copy to clipboard operation
PersFormer_3DLane copied to clipboard

How to train on single gpu ?

Open mickey-cool opened this issue 3 years ago • 0 comments

I encountered this problem when I try to train on a single Gpu, please help me,Thank you :

python main_persformer.py --mod=kkk --batch_size=8 --nepochs=200

proc_id: None world size: 1 local_rank: None None Traceback (most recent call last): File "main_persformer.py", line 40, in main() File "main_persformer.py", line 30, in main ddp_init(args) File "/media/lee/PersFormer_3DLane-main/experiments/ddp.py", line 80, in ddp_init setup_distributed(args) File "/media/lee/PersFormer_3DLane-main/experiments/ddp.py", line 63, in setup_distributed torch.cuda.set_device(args.gpu) File "/media/lee/miniconda3/envs/cc/lib/python3.7/site-packages/torch/cuda/init.py", line 309, in set_device device = _get_device_index(device) File "/media/lee/miniconda3/envs/cc/lib/python3.7/site-packages/torch/cuda/_utils.py", line 34, in _get_device_index return _torch_get_device_index(device, optional, allow_cpu) File "/media/lee/miniconda3/envs/cc/lib/python3.7/site-packages/torch/_utils.py", line 514, in _get_device_index 'or an integer, but got:{}'.format(device)) ValueError: Expected a torch.device with a specified index or an integer, but got:None

mickey-cool avatar Jul 09 '22 01:07 mickey-cool