sconlyshootery / FeatDepth

This is the offical codes for the methods described in the "Feature-metric Loss for Self-supervised Learning of Depth and Egomotion".
MIT License
247 stars 28 forks source link

ImportError: cannot import name 'get_world_size' #41

Closed yilawu closed 3 years ago

yilawu commented 3 years ago

run infer.py and get error

yilawu commented 3 years ago

Traceback (most recent call last): File "D:/PycharmProject/depth_estimate_2/scripts/infer.py", line 16, in from mono.datasets.utils import readlines File "D:\PycharmProject\depth_estimate_2\mono\datasets__init__.py", line 1, in from .loader import build_dataloader File "D:\PycharmProject\depth_estimate_2\mono\datasets\loader__init__.py", line 5, in from .build_loader import build_dataloader File "D:\PycharmProject\depth_estimate_2\mono\datasets\loader\build_loader.py", line 10, in from .sampler import GroupSampler, DistributedGroupSampler, DistributedSampler File "D:\PycharmProject\depth_estimate_2\mono\datasets\loader\sampler.py", line 11, in from torch.distributed import get_world_size, get_rank ImportError: cannot import name 'get_world_size'

sconlyshootery commented 3 years ago

It seems that your torch isn't installed correctly or you didn't install the GPU version.

sconlyshootery commented 3 years ago

I will close this issue, if you have further question, you are welcome to reopen it.