jetson nano 中pytorch安装
时间: 2023-05-29 17:02:09 浏览: 188
jetson nano安装pytorch
Jetson Nano上安装PyTorch的步骤如下:
1. 安装依赖项
```
sudo apt-get update
sudo apt-get install libopenblas-base libopenmpi-dev
```
2. 下载安装pytorch
进入 https://pytorch.org/ ,选择Jetson为平台,选择合适的版本下载安装。
例如,对于Jetson Nano,选择 Linux > JetPack 4.4 > Python > 1.7.0 > CUDA 10.2,复制安装命令
```
wget https://nvidia.box.com/shared/static/j8fsypf7a0ohssxlzbtvxspzj5lrln7m.whl -O torch-1.7.0-cp36-cp36m-linux_aarch64.whl
sudo apt-get install python3-pip libopenblas-base libopenmpi-dev
pip3 install Cython
pip3 install numpy torch-1.7.0-cp36-cp36m-linux_aarch64.whl
```
3. 验证PyTorch安装
运行以下Python代码,以确保安装成功
```
import torch
print(torch.__version__)
print(torch.cuda.is_available())
x = torch.rand(5, 3)
print(x)
```
阅读全文