Skip to content
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

hello,i met a problem when run train_baseline.py #11

Open
biubug6 opened this issue Jul 5, 2018 · 1 comment
Open

hello,i met a problem when run train_baseline.py #11

biubug6 opened this issue Jul 5, 2018 · 1 comment

Comments

@biubug6
Copy link

biubug6 commented Jul 5, 2018

trouble is printed follow:
/home/dl/.local/lib/python2.7/site-packages/torchvision/models/densenet.py:212: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
nn.init.kaiming_normal(m.weight.data)
Traceback (most recent call last):
File "train_baseline.py", line 333, in
model=nn.DataParallel(model,device_ids=[0,1,2]) # multi-GPU
File "/home/dl/.local/lib/python2.7/site-packages/torch/nn/parallel/data_parallel.py", line 102, in init
_check_balance(self.device_ids)
File "/home/dl/.local/lib/python2.7/site-packages/torch/nn/parallel/data_parallel.py", line 17, in _check_balance
dev_props = [torch.cuda.get_device_properties(i) for i in device_ids]
File "/home/dl/.local/lib/python2.7/site-packages/torch/cuda/init.py", line 292, in get_device_properties
raise AssertionError("Invalid device id")
AssertionError: Invalid device id

@qiaoguan
Copy link
Owner

qiaoguan commented Jul 5, 2018

this code is for multi-GPU training, did you use multi-gpu? if not , change to single-GPU training mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants