PyTorch (1): Introduction, installation

1 Introduction

PyTorch is a Python-based library used to provide a flexible deep learning development platform. The workflow of PyTorch is very close to Python's scientific computing library-numpy.

On January 18, 2017, the torch7 team under facebook announced that Pytorch is open source, the official website address: pytorch.

On April 25, 2018, PyTorch officially released version 0.4.0. This version of PyTorch has many major updates, the most important of which is to support Windows systems.

Windows users can install Pytorch directly through three methods: conda, pip and source code compilation. However, it should be emphasized that Pytorch under Windows only supports Python3.5 and Python3.6. It does not support other Python3 versions, nor does it support Python2.

PyTorch can be smoothly integrated with the Python data science stack.

PyTorch provides us with a framework so that computational graphs can be built at runtime and even changed at runtime. This is very valuable without knowing how much memory is needed to create a neural network.

Some other advantages of PyTorch include: multi-gpu support, custom data loader and simplified preprocessor.

The main elements you should know when you start using PyTorch: PyTorch tensor, mathematical operations, Autograd module, Optim module, neural network module

2. Installation

Go to the pytorch official website
to automatically configure the download command according to the automatic computer situation.
Insert picture description here
I am an AMD graphics card, so CUDA chose NONE

pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio===0.7.2 -f http

The execution process and results are shown in the figure below:
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_47542175/article/details/113857530