我在Windows 10上安装了Anaconda和Pytorch,并且安装它时没有错误。
,但我不知道为什么我没有Pytorch中的模块或软件包。您是否遇到了同样的问题?
这是我正在测试的程序:https://github.com/pytorch/examples/blob/master/master/imagenet/main.py
,因为您没有提供任何其他信息,因此有几件事可以尝试:
1)首先确保您已经安装了torchvision
2)然后尝试以下导入:
# this import is necessary
import torch.utils.data