pytorch使用
发布日期:2022-02-25 00:55:24 浏览次数:40 分类:技术文章

本文共 217 字,大约阅读时间需要 1 分钟。

torch.cuda.is_available()

cuda是否可用;

torch.cuda.device_count()

返回gpu数量

torch.cuda.get_device_name(0)

返回gpu名字,设备索引默认从0开始;

torch.cuda.current_device()

返回当前设备索引;

参考:

https://blog.csdn.net/nima1994/article/details/83001910

转载地址:https://blog.csdn.net/qq_30384533/article/details/103005361 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:树莓派配置
下一篇:clion windows配置

发表评论

最新留言

做的很好,不错不错
[***.243.131.199]2024年04月08日 07时47分21秒