安装了torch 1.12.0 + torchvision 0.13.0 + torchaudio 0.12.0版本后,
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.3 -c pytorch
按照《动手学深度学习》输入
from d2l import torch as d2l
命令,跳出警告
UserWarning: Failed to load image Python extension: warn(f“Failed to load image Python extension:
解决方法:
降级torch,torchvision,torchaudio版本为
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=11.3
再次运行未警告,问题解决。
标签:load,torchvision,extension,Python,image,Failed,pytorch From: https://www.cnblogs.com/value7/p/17605208.html