0
点赞
收藏
分享

微信扫一扫

RuntimeError: expected device cuda:0 and dtype Float but got device cuda:0 and dtype Half


RuntimeError: expected device cuda:0 and dtype Float but got device cuda:0 and dtype Half

  • ​​报错如下​​
  • ​​分析原因​​
  • ​​解决方法​​
  • ​​打开官网​​

报错如下

RuntimeError: expected device cuda:0 and dtype Float but got device cuda:0 and dtype Half_官网

分析原因

可能是pytorch版本问题

解决方法

打开官网

​​https://pytorch.org/get-started/locally/​​RuntimeError: expected device cuda:0 and dtype Float but got device cuda:0 and dtype Half_html_02

pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

成功安装pytorch1.7.1版本,即可解决此报错!


举报

相关推荐

0 条评论