1.主环境里进入激活pytoch环境
conda activate pytorch %%激活环境
2.输入python
(pytorch) python
Python 3.9.13 (main, Oct 13 2022, 21:15:33)
>>> import torch
>>> print(torch.__version__)
1.12.1
%%显示安装torch版本
>>> print(torch.cuda.is_available())
True
%%GPU能使用显示ture
>>> exit(0)
%%退出编写