若你按照Pytorch官网的中conda命令安装 ,大概率是Cpu版本。
怎么查看版本,在python console 中输入 import torch ; torch.cuda.is_available(),提示Ture 则是Gpu版本 反之 Gpu版本。
此时不要慌。打开cmd pip uninstall pytorch (pip安装的torch);
打开conda prompt conda uninstall pytorch/libtorch
多删几次,因为你输入一次指令就删除一行,直到你输入删除指令后,提示你无torch。
之后,你只需进入pytorch 官网,找到pip命令
在cmd中复制粘贴回车即可等待安装完毕,此时为GPU版本。