|名字 |功能 |参数 |定义 |备注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开始
上一篇

2021-09-15
下一篇

2021-09-14