torch.cuda.is_available(),torch.cuda.device_count(),torch.cuda.get_device_name(0)
生活随笔
收集整理的這篇文章主要介紹了
torch.cuda.is_available(),torch.cuda.device_count(),torch.cuda.get_device_name(0)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
torch.cuda.is_available()
cuda是否可用;
torch.cuda.device_count()
返回gpu數(shù)量;
torch.cuda.get_device_name(0)
返回gpu名字,設備索引默認從0開始;
torch.cuda.current_device()
返回當前設備索引;
總結
以上是生活随笔為你收集整理的torch.cuda.is_available(),torch.cuda.device_count(),torch.cuda.get_device_name(0)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 学生申请信用卡单位怎么填
- 下一篇: 用借呗会影响房贷吗 尽量不要经常使用