-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssertionError: Invalid device id #47
Comments
It seems your cuda issue. |
You have to change line 18 in HG_model.py up to you, for eg. device_ids = [0] |
Traceback (most recent call last):
File "/home/adesoji/MLOPS/MegaDepth/demo.py", line 18, in
model = create_model(opt)
File "/home/adesoji/MLOPS/MegaDepth/models/models.py", line 5, in create_model
model = HGModel(opt)
File "/home/adesoji/MLOPS/MegaDepth/models/HG_model.py", line 18, in init
model= torch.nn.parallel.DataParallel(model, device_ids = [0,1])
File "/home/adesoji/Videos/ENTER/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 142, in init
_check_balance(self.device_ids)
File "/home/adesoji/Videos/ENTER/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 23, in _check_balance
dev_props = _get_devices_properties(device_ids)
File "/home/adesoji/Videos/ENTER/lib/python3.8/site-packages/torch/_utils.py", line 455, in _get_devices_properties
return [_get_device_attr(lambda m: m.get_device_properties(i)) for i in device_ids]
File "/home/adesoji/Videos/ENTER/lib/python3.8/site-packages/torch/_utils.py", line 455, in
return [_get_device_attr(lambda m: m.get_device_properties(i)) for i in device_ids]
File "/home/adesoji/Videos/ENTER/lib/python3.8/site-packages/torch/_utils.py", line 438, in _get_device_attr
return get_member(torch.cuda)
File "/home/adesoji/Videos/ENTER/lib/python3.8/site-packages/torch/_utils.py", line 455, in
return [_get_device_attr(lambda m: m.get_device_properties(i)) for i in device_ids]
File "/home/adesoji/Videos/ENTER/lib/python3.8/site-packages/torch/cuda/init.py", line 312, in get_device_properties
raise AssertionError("Invalid device id")
AssertionError: Invalid device id
The text was updated successfully, but these errors were encountered: