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.

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的更多相关文章

  1. Action(8):Error -27728:Step download timeout(120 seconds)has expired when downloading

    Action(8):Error -27728:Step download timeout(120 seconds)has expired when downloading   出现如下图所示对话框上的 ...

  2. Tomcat Clustering - A Step By Step Guide --转载

    Tomcat Clustering - A Step By Step Guide Apache Tomcat is a great performer on its own, but if you'r ...

  3. WPF Step By Step 系列-Prism框架在项目中使用

    WPF Step By Step 系列-Prism框架在项目中使用 回顾 上一篇,我们介绍了关于控件模板的用法,本节我们将继续说明WPF更加实用的内容,在大型的项目中如何使用Prism框架,并给予Pr ...

  4. Struts2+Spring+Hibernate step by step 11 ssh拦截验证用户登录到集成

    注意:该系列文章从教师王健写了一部分ssh集成开发指南 引言: 之前没有引入拦截器之前,我们使用Filter过滤器验证用户是否登录,在使用struts2之后,全然能够使用拦截器,验证用户是否已经登录, ...

  5. WPF MVVM 架构 Step By Step(6)(把actions从view model解耦)

    到现在为止,我们创建了一个简单的MVVM的例子,包含了实现了的属性和命令.我们现在有这样一个包含了例如textbox类似的输入元素的视图,textbox用绑定来和view model联系,像点击but ...

  6. 精通initramfs构建step by step

    (一)hello world  一.initramfs是什么  在2.6版本的linux内核中,都包含一个压缩过的cpio格式 的打包文件.当内核启动时,会从这个打包文件中导出文件到内核的rootfs ...

  7. Metrics.NET step by step使用Metrics监控应用程序的性能

    使用Metrics监控应用程序的性能 在编写应用程序的时候,通常会记录日志以便事后分析,在很多情况下是产生了问题之后,再去查看日志,是一种事后的静态分析.在很多时候,我们可能需要了解整个系统在当前,或 ...

  8. Step by Step Process of Migrating non-CDBs and PDBs Using ASM for File Storage (Doc ID 1576755.1)

    Step by Step Process of Migrating non-CDBs and PDBs Using ASM for File Storage (Doc ID 1576755.1) AP ...

  9. Asp.Net Core 5 REST API - Step by Step

    翻译自 Mohamad Lawand 2021年1月19日的文章 <Asp.Net Core 5 Rest API Step by Step> [1] 在本文中,我们将创建一个简单的 As ...

随机推荐

  1. __x__(19)0907第四天__ HTML5 文本标签 及 样式

    strong 表语义上的强调, em 表示语气上的强调: <strong>警告:离僵尸远点!</strong> 世界末日了,因为僵尸是<em>有毒的</em& ...

  2. ECMA Script 6_数组的扩展_扩展运算符

    1. 扩展运算符 内部调用的是数据结构的 Iterator 接口, 因此只要具有 Iterator 接口的对象,都可以使用扩展运算符 ... 如 map,,,, [...arr] 扩展运算符(spre ...

  3. vue-cli 脚手架 Command Line Interface

    mac sudo npm install -g nrm sudo npm config -g set unsafe-perm sudo npm install webpack@3.0.0 -g sud ...

  4. SQL Server 查询某个字段值在哪张表的哪个字段

    我要查找值为‘WSCOL1525’的字段. declare @cloumns varchar(40)declare @tablename varchar(40)declare @str varchar ...

  5. 团队项目-课程MS需求分析心得

    我们的课程管理项目需求讲道理其实应该是比较简单的,但是在经过几次和老师讨论过后,项目需求已经多得让人脑门疼,后来继续跟老师聊,老师嘴上说着减减减,但是每次讨论下来需求还是会变得更多,以致于个人已经不再 ...

  6. 菜鸟详细解析Cookie注入原理

    一.SQL注入原理 我以aspx为例,现在我们来研究下Cookie注入是怎么产生的,在获取URL参数的时候,如果在代码中写成Request[“id”],这样的写法问题就出现了.我先普及下科普知识,在a ...

  7. js滚动条滚动到底部触发事件

    $("#contain").scroll(function(){ var $this =$(this), viewH =$(this).height(),//可见高度 conten ...

  8. Python读取xlsx翻译文案

    首先安装Python,然后安装模块 //查找模块(非必须) pip search xlrd //安装模块 pip install xlrd 由于输出要是utf-8所以需要设置默认环境为utf-8 # ...

  9. C++/C代码审查注意事项(摘录,非原创)

    文件结构 头文件和定义文件的名称是否合理?头文件和定义文件的目录结构是否合理?版权和版本声明是否完整? 重要头文件是否使用了 ifndef/define/endif 预处理块?头文件中是否只存放“声明 ...

  10. UnicodeDecodeError: 'ascii' codec can't decode byte 0xc7 in position 20: ordinal not in range(128)

    dict = pickle.load(open(file, 'rb')) 修改为: dict = pickle.load(open(file, 'rb'), encoding='iso-8859-1' ...