Traceback (most recent call last):
File "main.py", line 212, in
fire.Fire()
File "C:\Users\yinzhiqiang\anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "C:\Users\yinzhiqiang\anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 468, in _Fire
target=component.name)
File "C:\Users\yinzhiqiang\anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 672, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "main.py", line 43, in train
torch.cuda.set_device(opt.gpu_id)
File "C:\Users\yinzhiqiang\anaconda3\envs\pytorch\lib\site-packages\torch\cuda__init__.py", line 263, in set_device
torch._C._cuda_setDevice(device)
RuntimeError: CUDA error: invalid device ordinal
作者,您好。我在使用DeepCoNN训练模型的时候需要RuntimeError: CUDA error: invalid device ordinal问题,搜索了一圈没有有效的方法,想请教您帮我看看,十分感谢! (pytorch) D:\workspace\pycharm\Neu-Review-Rec>python main.py train --model=DeepCoNN --num_fea=1 --output=fm load npy from dist...
user config: vocab_size => 50002 word_dim => 300 r_max_len => 202 u_max_r => 13 i_max_r => 24 train_data_size => 51764 test_data_size => 6471 val_data_size => 6471 user_num => 5543 item_num => 3570 batch_size => 128 print_step => 100
Traceback (most recent call last): File "main.py", line 212, in
fire.Fire()
File "C:\Users\yinzhiqiang\anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "C:\Users\yinzhiqiang\anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 468, in _Fire
target=component.name)
File "C:\Users\yinzhiqiang\anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 672, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "main.py", line 43, in train
torch.cuda.set_device(opt.gpu_id)
File "C:\Users\yinzhiqiang\anaconda3\envs\pytorch\lib\site-packages\torch\cuda__init__.py", line 263, in set_device
torch._C._cuda_setDevice(device)
RuntimeError: CUDA error: invalid device ordinal