pytorch无法获取设备名称

时间:2019-12-22 04:20:10

标签: python pytorch

torch.cuda._initialized=True
torch.cuda.is_available()

#return True

torch.cuda.set_device(0)
#i have only one gpu card

torch.cuda.current_device()
#return 0

#now comes to the error
torch.cuda.get_device_name(0)
  

返回NameError:名称'_get_device_properties'未定义

有时我可以获得正确的设备名称,但更常见的是上面的NameError。

如果出现错误,我选择继续在gpu上运行dnn,anaconda将报告“内核死亡”

请告诉我如何解决此错误,非常感谢!

0 个答案:

没有答案