uber-research / DeepPruner

DeepPruner: Learning Efficient Stereo Matching via Differentiable PatchMatch (ICCV 2019)
Other
354 stars 41 forks source link

no-cuda error #3

Closed oxm closed 4 years ago

oxm commented 4 years ago

@ShivamDuggal4 args.cuda = True,submission_kitti.py runs correctly,when I set --no-cuda,args.cuda=False,such error appeared:

Traceback (most recent call last): File "submission_kitti.py", line 83, in model.load_state_dict(state_dict['state_dict'], strict=True) File "/home/xxm/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 845, in load_state_dict self.class.name, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for DeepPruner:

ShivamDuggal4 commented 4 years ago

Hi @oxm , Just take model = nn.DataParallel(model) out of the if args.cuda: block in the line https://github.com/uber-research/DeepPruner/blob/2b5a0e92735333376df16a46e91b6b215b08c797/deeppruner/submission_kitti.py#L73

I will edit it in some of the later commits.

oxm commented 4 years ago

@ShivamDuggal4 hi,according to your opinion, the problem was sovled.