Jetson安裝與設定
阿新 • • 發佈:2020-12-23
目錄
1. 安裝pytorch
pytorch:
wget https://nvidia.box.com/shared/static/wa34qwrwtk9njtyarwt5nvo6imenfy26.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
torchvision:
$ sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libavcodec-dev libavformat-dev libswscale-dev $ git clone --branch <version> https://github.com/pytorch/vision torchvision # see below for version of torchvision to download $ cd torchvision $ export BUILD_VERSION=0.x.0 # where 0.x.0 is the torchvision version $ sudo python setup.py install # use python3 if installing for Python 3.6 $ cd ../ # attempting to load torchvision from build dir will result in import error $ pip install 'pillow<7' # always needed for Python 2.7, not needed torchvision v0.5.0+ with Python 3.6
pytorch 與 torchvision 之間的對應關係:
PyTorch v1.0 - torchvision v0.2.2
PyTorch v1.1 - torchvision v0.3.0
PyTorch v1.2 - torchvision v0.4.0
PyTorch v1.3 - torchvision v0.4.2
PyTorch v1.4 - torchvision v0.5.0
PyTorch v1.5 - torchvision v0.6.0
PyTorch v1.6 - torchvision v0.7.0
PyTorch v1.7 - torchvision v0.8.1