Skip to content

cuda problem #57

@liuchean

Description

@liuchean

Traceback (most recent call last):
File "edgeyolo-main\edgeyolo-main\train.py", line 16, in
train("DEFAULT" if args.default else args.cfg)
File "edgeyolo-main\edgeyolo\train\launch_train.py", line 101, in launch
mp.start_processes(
File "pythonProject1.venv\lib\site-packages\torch\multiprocessing\spawn.py", line 188, in start_processes
while not context.join():
File "pythonProject1.venv\lib\site-packages\torch\multiprocessing\spawn.py", line 150, in join

raise ProcessRaisedException(msg, error_index, failed_process.pid)

torch.multiprocessing.spawn.ProcessRaisedException:

-- Process 1 terminated with the following error:
Traceback (most recent call last):
File "pythonProject1.venv\lib\site-packages\torch\multiprocessing\spawn.py", line 59, in wrap
fn(i, *args)
File "edgeyolo-main\edgeyolo-main\edgeyolo\train\launch_train.py", line 50, in train_single
torch.cuda.set_device(device)
File "pythonProject1.venv\lib\site-packages\torch\cuda_init
.py", line 261, in set_device
torch._C._cuda_setDevice(device)
RuntimeError: CUDA error: invalid device ordinal

原本是出現文中提到的bug,我將torch版本降到1.8.0版本
結果運行出現上面bug
想請問是哪邊出了問題

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions