Setting up Pytorch with Python 3 on Ubuntu(Source code compilation)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fjssharpsword/article/details/85062673

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进入验证:

扫描二维码关注公众号,回复: 4587066 查看本文章

import torch

import torchvision

猜你喜欢

转载自blog.csdn.net/fjssharpsword/article/details/85062673
今日推荐