shubham-goel / ucmr

Code for the ECCV2020 paper "Shape and Viewpoint without Keypoints".
https://shubham-goel.github.io/ucmr/
148 stars 11 forks source link

Multi-GPU training #10

Closed xuxy09 closed 3 years ago

xuxy09 commented 3 years ago

Hi,

I am trying to run the training code. The code runs well with a single GPU, but it fails with multiple GPUs: File "/lib/python3.6/site-packages/torch/nn/parallel/_functions.py", line 54, in forward assert all(map(lambda i: i.is_cuda, inputs)) AssertionError

The error comes from File "/ucmr/src/experiments/camOpt_shape.py", line 635, in forward self.return_dict = self.model(input_dict)

I notice that there is data-parallel in your code so I suppose you use multiple GPUs during training. Could you please let me know how to solve this problem?

Thanks!

shubham-goel commented 3 years ago

Hi @xuxy09. Sorted now. FYI: Though the code supports it, I didn't use multi-gpu training in any of my experiments.