Check whether your cuda is installed Type in the anaconda prompt The display above indicates that the installation is complete. Configure Tsinghua Park download environment Also enter in the anaconda prompt conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/peterjc123/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ conda config --set show_channel_urls yes Then delete the .condarc file in the C:\Users\Administrator directory, open the file and delete the defaults line. As shown in the following figure: Click to enter the pytorch official website Official website link: https://pytorch.org/get-started/locally/. Choose your own version, as follows: conda install pytorch torchvision cudatoolkit=10.1 -c pytorch The meaning of this line of code is: when installing pytorch, torchvision will also be installed, so there is no need to install torchvision later. cudatoolkit=10.1 means cuda version 10.1. -c means downloading from the official website. Without -cpu, it indicates GPU version. Configure your own cuda version of pytorch, what to do if the cuda version is too low As mentioned above, just change cudatoolkit=10.1 to your own cuda version, such as mine is cuda 9.0: conda install pytorch torchvision cudatoolkit=9.0 pytorch Just install it. Install the specified version of torchvision When you are looking at the code, sometimes the author requires a specific version of torch or torchvision. This can only be done by downloading previous versions of the file on the official website. Click Previous PyTorch Versions The corresponding file of the version you want to find is above, just download it and Verify that your pytorch is installed That's it! Python import torch exit() Congratulations on your successful installation. Summarize The above is the editor's introduction to win10 using Tsinghua source to quickly install pytorch-GPU version. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Why does MySQL database index choose to use B+ tree?
>>: Summary of some practical little magic in Vue practice
Here is a record of how to make a scroll bar appe...
1. Go to the official website to download the ins...
This article example shares the specific code of ...
Today, the company's springboot project is re...
As usual, let’s first post the picture effect: Th...
This article uses examples to illustrate the prin...
mysql full backup 1. Enable binary log and separa...
Table of contents Uninstall and install samba Cre...
This article introduces a tutorial about how to u...
1. Why set maxPostSize? The tomcat container has ...
Table of contents 1. Understanding the Equality R...
1. The ENV instruction in the Dockerfile is used ...
Table of contents Overview Functionality and read...
Note: The nginx version must be 1.9 or above. Whe...
Process 1: with return value: drop procedure if e...