PyTorch in Action: A Step by Step Tutorial PyTorch in Action: A Step by Step Tutorial

PyTorch in Action: A Step by Step Tutorial

 

PyTorch in Action: A Step by Step Tutorial

Installation Guide

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

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

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

Step 2, create a conda virtual envriommentmarkdown

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".app

In the Conda Prompt run the following commands:ide

conda create -n PyTorch-CPU pip

Step 3, install PyTorchpost

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).ui

In the Conda Prompt run the following commands:this

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/
相關文章
相關標籤/搜索