1

I am new to pytorch, and I am trying to follow guides (like this one) that start with:

from torchvision.datasets.vision import VisionDataset

or

from .vision import VisionDataset

When I try to run it I get an error:

ImportError: No module named vision

In addition, It seems that torchvision.datasets.vision is not mentioned in any documentation. Please help. Thanks.

yliats
  • 93
  • 2
  • 10

1 Answers1

2

You need to upgrade your torchvision package as VisionDataset was introduced in torchvision 0.3.0 in PR#749 as a base class for all datasets. Check the release.

kHarshit
  • 11,362
  • 10
  • 52
  • 71
  • I had to rebuild the entire virtual environment for this upgrade, but eventually it worked. Thanks! – yliats Dec 27 '19 at 09:46