Not Genius
Not Genius

Reputation: 37

No module named 'torch.utils.data.distributed'

I have installed anaconda and pytorch on my windows 10 and there was no errors when I installed it.

But I don't know why I don't have the modules or packages in pytorch. Have you experienced the same problem?

This is the program I'm testing: https://github.com/pytorch/examples/blob/master/imagenet/main.py

Upvotes: 1

Views: 14039

Answers (1)

kmario23
kmario23

Reputation: 61385

Because you didn't provide any additional information, there are couple of things you can try:

1) first make sure that you've already installed torchvision

2) Then try the following import:

# this import is necessary
import torch.utils.data

Upvotes: 2

Related Questions