1

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

0

1 Answer 1

2

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
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks.But I have installed torchvision.And this is my import:import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.distributed as dist import torch.optim import torch.utils.data import torch.utils.data.distributed import torchvision.transforms as transforms import torchvision.datasets as datasets import torchvision.models as models

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.