码迷,mamicode.com
首页 > 其他好文 > 详细

PyTorch in Action: A Step by Step Tutorial

时间:2019-01-25 22:42:38      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:ali   env   sci   mirror   specific   strong   清华大学   name   led   

 

PyTorch in Action: A Step by Step Tutorial

Installation Guide

Step 1, donwload the Miniconda and installing it on your computer.

The reason why explain installing conda is that some of classmates don`t have a conda environment on their computer.

https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/

Step 2, create a conda virtual envriomment

In this ariticle, we assume that there is a CPU version of PyTorch is going to be installed. To specifically distinguish CPU version and GPU version, we`re going to create a virtual environment named "PyTorch-CPU".

In the Conda Prompt run the following commands:

conda create -n PyTorch-CPU pip

Step 3, install PyTorch

On the website of PyTorch(https://pytorch.org/), there is a guidance on the page. To chose the most appropriate options(e.g. as the follow figure).

技术分享图片

In the Conda Prompt run the following commands:

activate PyTorh-CPU
conda install pytorch-cpu torchvision-cpu -c pytorch

Congratulations, installation of PyTorch is complete!

pypi 源

国内源的地址

名称地址
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

使用方法

$ pip3 install {package name} -i http://mirrors.aliyun.com/pypi/simple/

比如,安装 scikit-learn 的命令用例如下

$ pip3 install scikit-learn -i http://mirrors.aliyun.com/pypi/simple/

PyTorch in Action: A Step by Step Tutorial

标签:ali   env   sci   mirror   specific   strong   清华大学   name   led   

原文地址:https://www.cnblogs.com/hanouba/p/10321760.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!