isl-org / MiDaS

Code for robust monocular depth estimation described in "Ranftl et. al., Towards Robust Monocular Depth Estimation: Mixing Datasets for Zero-shot Cross-dataset Transfer, TPAMI 2022"
MIT License
4.43k stars 619 forks source link

Trianing with Multiple GPUs #217

Open shenglunch opened 1 year ago

shenglunch commented 1 year ago

Very nice job!

I try to fine-tune your pretrained model with multiple GPUs?But the code ‘layer_1_rn = self.scratch.layer1_rn(layer_1)’ yields an error. RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! (when checking argument for argument weight in method wrapper__cudnn_convolution).

How to solve it?

Thanks!