conda remove -n 环境名 --all # 删除环境
conda create -n hsnet python=3.7 # 创建 环境
测试pytorch 是否安装成功代码
import torch
print(torch.__version__)
print(torch.cuda.is_available())
x = torch.randn(1)
if torch.cuda.is_available():
device = torch.device("cuda")
y = torch.ones_like(x, device=device)
x = x.to(device)
z = x + y
print(z)
print(z.to("cpu", torch.double))
安装tensorflow及 tensorboardX conda install -c conda-forge tensorflow pip3 install tensorboardX



