我在Windows 10中安装了GPU和CUDA,但Pytorch的torch.cuda.is_avaiable()返回false;我该如何纠正?

用户名

我在装有Nvidia GTX 1050 GPU的Windows 10计算机上安装了PyTorch。我已经安装了CUDA Toolkit,并使用Nvidia指令对其进行了测试,并且运行顺利,包括执行建议的测试。

但是,torch.cuda.is_available()返回False我怎样才能解决这个问题?

sarjit07

我也有同样的问题。并运行此=> a=torch.cuda.FloatTensor(),给出断言错误AssertionError: Torch not compiled with CUDA enabled ...这清除了我在不使用cuda的情况下运行pytorch的情况。

脚步:

  1. 确保您已卸载pytorch pip uninstall pytorch

  2. https://pytorch.org/get-started/locally/

  3. 根据您的系统选择配置。如下图所示

  4. 复制脚本Run this command并在终端上运行

在此处输入图片说明

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章