Python/torch
来自康健生活
< Python
引言
安装
/home/kangkk
pip3 install torch
验证
testtorch.py
import torch
x = torch.rand(5, 3)
print(x)
是否启用了 CUDA 驱动程序。
testtorchiscuda.py
import torch
torch.cuda.is_available()
No categories
/home/kangkk
pip3 install torch
import torch
x = torch.rand(5, 3)
print(x)
是否启用了 CUDA 驱动程序。
import torch
torch.cuda.is_available()
No categories