• Get Started
  • Ecosystem
  • Mobile
  • Blog
  • Tutorials
  • Docs
    PyTorch

    torchaudio

    torchtext

    torchvision

    TorchElastic

    TorchServe

    PyTorch on XLA Devices

  • Resources
    About

    Learn about PyTorch’s features and capabilities

    Community

    Join the PyTorch developer community to contribute, learn, and get your questions answered.

    Developer Resources

    Find resources and get questions answered

    Forums

    A place to discuss PyTorch code, issues, install, research

    Models (Beta)

    Discover, publish, and reuse pre-trained models

  • GitHub
  • X

Resources

Explore educational courses, get your questions answered, and join the discussion with other PyTorch developers.

Docs

Access comprehensive developer documentation.

PyTorchDiscuss

Browse and join discussions on deep learning with PyTorch.

Slack

Discuss advanced topics. Request access: https://bit.ly/ptslack

Tutorials

Get in-depth tutorials for beginners and advanced developers.

中文文档

Docs and tutorials in Chinese, translated by the community.

GitHub

Report bugs, request features, discuss issues, and more.

파이토치(PyTorch)

Tutorials in Korean, translated by the community.

日本語(PyTorch)

Tutorials in Japanese, translated by the community.

Examples

View example projects for vision, text, RL, and more.

fast.ai

Get up and running on PyTorch quickly with free learning courses.

MobileDemo

Check out the PyTorch Mobile demo app for iOS and Android.

Dive into Deep Learning

An interactive deep learning book.

Install PyTorch

Select your preferences and run the install command. Stable represents the most currently tested and supported version of PyTorch. This should be suitable for many users. Preview is available if you want the latest, not fully tested and supported, 1.8 builds that are generated nightly. Please ensure that you have met the prerequisites below (e.g., numpy), depending on your package manager. Anaconda is our recommended package manager since it installs all dependencies. You can also install previous versions of PyTorch. Note that LibTorch is only available for C++.

PyTorch Build
Your OS
Package
Language
CUDA
Run this Command:
PyTorch Build
Stable (1.7.1)
Preview (Nightly)
Your OS
Linux
Mac
Windows
Package
Conda
Pip
LibTorch
Source
Language
Python
C++ / Java
CUDA
9.2
10.1
10.2
11.0
None
Run this Command:
conda install pytorch torchvision -c pytorch
Previous versions of PyTorch

Quick Start With
Cloud Partners

Get up and running with PyTorch quickly through popular cloud platforms and machine learning services.

Alibaba Cloud
  • Alibaba Cloud PAI
Amazon Web Services
  • PyTorch on AWS
  • Amazon SageMaker
  • AWS Deep Learning Containers
  • AWS Deep Learning AMIs
Google Cloud Platform
  • Cloud Deep Learning VM Image
  • Deep Learning Containers
Microsoft Azure
  • PyTorch on Azure
  • Azure Machine Learning
  • Azure Functions

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources
  • PyTorch
  • Get Started
  • Features
  • Ecosystem
  • Blog
  • Contributing
  • Resources
  • Tutorials
  • Docs
  • Discuss
  • GitHub Issues
  • Brand Guidelines
  • Terms
  • |
  • Privacy
  • Get Started
  • Ecosystem
  • Mobile
  • Blog
  • Tutorials
  • Docs
  • Docs
    • PyTorch
    • torchaudio
    • torchtext
    • torchvision
    • TorchElastic
    • TorchServe
    • PyTorch on XLA Devices
  • Resources
    • About
    • Community
    • Developer Resources
    • Forum
    • Models (Beta)
  • GitHub

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.