yliats
yliats

Reputation: 93

from torchvision.datasets.vision import VisionDataset ImportError: No module named vision

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.

Upvotes: 1

Views: 5142

Answers (1)

Harshit Kumar
Harshit Kumar

Reputation: 12837

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.

Upvotes: 2

Related Questions