pytorch验证GPU版本是否可用

时间:2021-05-15 19:05:20   收藏:0   阅读:33
import torch
 
torch.cuda.is_available()
True
 
torch.cuda.current_device()
0
 
torch.cuda.device(0)
<torch.cuda.device object at 0x0000023034332438>
 
torch.cuda.device_count()
1
 
torch.cuda.get_device_name(0)
‘GeForce GTX 1660‘
————————————————

  

版权声明:本文为CSDN博主「Mr.Jcak」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_38314865/article/details/102410371

原文:https://www.cnblogs.com/zb-ml/p/14771439.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!