Click on the asynchronous book, the top public account

Every day to share with you IT good books technology dry goods workplace knowledge


Install PyTorch 0.4 in the Windows installation source.

Windows 10 Home

Visual Studio 2017 Community

CUDA 9.0 + cuDNN 7.0

Anaconda 5,Python 3.6.4

1. Install the software

1.1. Install Visual Studio

You need to install Visual Studio 2017, the free Community version is ok, do not preview, official version is ok. To open the Visual Studio Installer, install:

Use C++ desktop development

VC++ 2017 version v14.11 toolbox

Anaconda can also be checked so that you can skip installing Anaconda


Install.

1.2. Install Anaconda

Download Anaconda,Python3. Install, check add to PATH, if not check manually add!

1.3 Installing CUDA and cuDNN

If you do not have an Nvidia graphics card or do not need an Nvidia graphics card to support skipping, you need to set the environment variable NO_CUDA=1 during installation.

I installed CUDA 9.0, cuDNN 7.0

You need to check Nsight Visual Studio Edition.

Install PyTorch

2.1 preparation

2.1.1 Modifying CUDA Header Files

Visual Studio 2017 is the latest release of Visual Studio 2017.

unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported!

Skip without CUDA support

Open – % CUDA_PATH % include CRT host_config.h –

#if _MSC_VER < 1600 || _MSC_VER > 1911

// Change 1911 to 1920

2.1.2 Installing Dependencies

Conda set tsinghua university mirror, faster. Pytorch 0.3 can also be installed via Tsinghua University Mirror

2.1.3 download the PyTorch source code

2.2, install,

The above directory needs to be replaced with your own Visual Studio installation directory

set CMAKE_GENERATOR=Visual Studio 15 2017 Win64

set DISTUTILS_USE_SDK=1

Call “% VS150COMNTOOLS % \vcvarsall.bat” x64-vcvars_ver =14.11

14.13 and other versions have not been tried

Python setup.py install wait for a while and you are done. The first time I forgot to change the CUDA header file caused by a setup error.

2.3, tests,

Exit the installed CMD and restart a CMD or PowerShell.

Reference: github.com/pytorch/pyt…


This article is excerpted from the Asynchronous Community by RuiCylooq, PyTorch 0.4 Source Code Installation (Windows)

Stretch recommended

New book in February 2018

A blockbuster book for January 2018

Primary school students start learning Python, the closest programming language to AI: A Wave of Python books from Amway

Policy warming: Everyone is learning big data, a wave of good books recommended

Eight new books. Send one you like

AI | classic books (introduction to artificial intelligence which books to read?

Long press the QR code, you can follow us yo

I share IT articles with you every day.

If you reply “follow” in the background of “Asynchronous books”, you can get 2000 online video courses for free. Recommend friends to pay attention to according to the prompts to get a gift book link, free of charge asynchronous books. Come and join us!