消除RuntimeError: expected backend CUDA and dtype Float而实际获得backend CUDA and dtype Half的错误
发布时间
阅读量:
阅读量
问题描述
在执行Gituhub程序的过程中,系统提示了错误信息
......
y[..., 0:2] = (y[..., 0:2] * 2. - 0.5 + self.grid[i].to(x[i].device)) * self.stride[i] # xy
RuntimeError: expected backend CUDA and dtype Float but got backend CUDA and dtype Half
解决方法概述
通过网络检索相关博客后,推测问题可能源于Pytorch的版本差异
确认当前计算机所安装的Python版本以及Pytorch的具体版本信息
import torch
print(torch.__version__)
从系统信息中可观察到,所使用的Python版本为3.6.3,而Pytorch的版本则为1.1.0。

确认程序执行所需的相关环境配置
全部评论 (0)
还没有任何评论哟~
