Pytorch函数总结-GPU相关函数


|名字 |功能 |参数 |定义 |备注1 |备注2
|—- |—- |—- |—- |—- |—-
|torch.cuda.is_available()| 查看gpu是否可用
|torch.cuda.device_count()| gpu数量
|torch.cuda.current_device()| 当前gpu索引号
|torch.cuda.get_device_name()| 根据gpu 索引号查看gpu名字 输出 ‘GeForce GTX 1050’ | gpu的index 从0开始


文章作者: jasme
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 jasme !
  目录