gpt4 book ai didi

python - torchvision.io 在 __init.py__ 中找不到引用 read_image()

转载 作者:行者123 更新时间:2023-12-05 03:43:10 25 4
gpt4 key购买 nike

我正在尝试从 torchvision.io 导入 read_image当我将鼠标悬停在它说的错误上时

torchvision.io 在“__init.py__”中找不到引用“read_image”

from torchvision.io import read_image

我正在学习这个例子

https://pytorch.org/tutorials/beginner/basics/data_tutorial.html

from torchvision.io import read_image ImportError: cannot import name 'read_image' from 'torchvision.io' (C:\Users\X\.conda\envs\Pytorch37\lib\site-packages\torchvision\io\__init__.py)这是我遇到的错误。

最佳答案

You need to upgrade the version of your pytorch

# Just for my version of system and cuda, you need to replace the cmd below based on your condition
pip install torch torchvision torchaudio

关于python - torchvision.io 在 __init.py__ 中找不到引用 read_image(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66883963/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com