Setting up Pytorch with Python 3 on Ubuntu(Source code compilation)
生活随笔
收集整理的這篇文章主要介紹了
Setting up Pytorch with Python 3 on Ubuntu(Source code compilation)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、安裝yaml依賴:sudo apt-get install python-yaml python3-yaml
2、git clone pytorch 源碼:
git clone https://github.com/pytorch/pytorch.git
git clone https://github.com/pytorch/vision.git
3、pytorch安裝:進入pytorch目錄
git submodule update --init --recursive
sudo python3 setup.py install
4、 pytorchvision安裝:進入vision目錄
sudo apt-get install cmake
sudo python3 setup.py install
5、python3進入驗證:
import torch
import torchvision
總結
以上是生活随笔為你收集整理的Setting up Pytorch with Python 3 on Ubuntu(Source code compilation)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Setting up Jupyter w
- 下一篇: Ubuntu下浏览Json文件