qiaoguan / Person-reid-GAN-pytorch

A Pytorch Implementation of "Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in vitro"(ICCV17)
158 stars 49 forks source link

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

Open biubug6 opened 6 years ago

biubug6 commented 6 years ago

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.kaimingnormal. 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 commented 6 years ago

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