Pytorch Getting Started--installation

Source: Internet
Author: User
Tags pytorch

Pytorch currently supports the platform has Linux and OSX, on the Pytorch website each platform provides Conda, Pip, source three kinds of installation methods, but also can be based on the GPU for CUDA installation, here to ubuntu14.04 for installation learning.

1. Anaconda Installation Configuration
The installation process references my previous Anaconda+tensorflow+theano+keras installation blog.
Due to wall problems, installing pytorch with Conda will fail during the process because the anaconda.org server is abroad. Here you can use the Tsinghua tuna image source, including the Anaconda warehouse image, add it to the Conda configuration, configured as follows:

# Add Anaconda Tuna Mirror
$  conda config--add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
# Tuna's help in the mirror address with quotation marks, need to remove the

# Setting search Display Channel address
$  conda config--set show_channel_urls Yes

After executing the above command, the ~/.condarc file is generated and the configuration of the Conda is recorded, and it is the same effect to manually create and edit the file directly.

2. Pytorch installation
Here for installation, I use Conda installation:

$  Conda Install Pytorch torchvision-c soumith

3. Testing
Enter Python mode to see if you can import torch successfully:

$  python
>  import Torch

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.