判断pytorch是否可用?输出GPU数量和编号
1.输出torch版本号2.判断安装后的torch是否可用?3.输出GPU数4.输出GPU名字5.输出现在正在使用的GPU编号import torchprint("torch版本号:",end="")print(torch.__version__)print("判断torch是否可用:",end="")print(torch.cuda.is_available())print("gpu数量:",end="")print(torch.cuda.device_cou.
原创
2021-05-19 17:06:36 ·
3520 阅读 ·
0 评论