当前位置:网站首页>Torch learning (I): environment configuration

Torch learning (I): environment configuration

2022-06-23 18:04:00 Inge

1 Anaconda install

  Anaconda Refers to an open source Python Release version , It contains conda、Python And so on .
   Installation can refer to :https://blog.csdn.net/ITLearnHall/article/details/81708148

2 Jupyter install

  Jupyter It's data analysis 、 Common tools for machine learning , The advantage is :
   Code can be 、 Documents, etc , Let users know at a glance .
   Installation can refer to :https://jupyter.org/install perhaps https://blog.csdn.net/Lee_J_R/article/details/52791228
   for example :

pip install jupyterlab

   notes : If command "jupyter notebook" Report errors , Try the following ways to solve :
  1) take "…/Python\Python37\site-packages" Add to path , The key for site-packages;
  2) Use command "python -m notebook" command

   Open the interface as follows :
 Insert picture description here

3 CUDA install

   In deep learning, it is inevitable to use GPU, Therefore, the installation of Torch Need to be GPU edition , So install first CUDA, Steps are as follows :
  1) open NVIDIA Control panel , Click Help , Check system information :
 Insert picture description here
  2) Pay attention to your driver version : My is 399.24
 Insert picture description here
  3) Query driver version and CUDA Correspondence of :
 Insert picture description here
   The source of the picture is as follows :
  https://blog.csdn.net/zhw864680355/article/details/90411288

  4) stay CUDA Find the corresponding version on the official website , The official website is as follows , I chose 9.2 edition :
  https://developer.nvidia.com/cuda-toolkit-archive
 Insert picture description here
  5) Download and install it , It should be noted that Please select a custom installation , And uncheck visual studio, Specific reference to :
  https://blog.csdn.net/u010618587/article/details/82940528

4 Torch install

   This article needs to use PyTorch frame , The installation address is as follows :
  https://pytorch.org/get-started/locally/

   Specific steps :
  1) Select the appropriate installation command :
 Insert picture description here
  2) Use domestic image :
   Due to timeout error during direct installation , Therefore, it needs to be moved to the domestic image , Common domestic images can be referred to :
  https://blog.csdn.net/sinat_21591675/article/details/82770360
   Take Alibaba cloud for example , The installation command can be as follows , Add the following statement to pythoch In the initial command :

-i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

   The final order is as follows :

pip install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com torch==1.3.1+cu92 torchvision==0.4.2+cu92 -f https://download.pytorch.org/whl/torch_stable.html

   If it appears "Read time out" error , Please try a few more times , Or change to another image source (#^.^#)
  3) Check to see if the installation was successful :

import torch
print(torch.cuda.is_available())

   If output True, Installation succeeded .

thank

   Thanks to Li Mu 、Aston Zhang Wait for the teacher's book 《 Hands-on deep learning 》 A Book , It has provided great help for my deep learning . A series of blogs about deep learning in this article have no intention of infringement , Just to record your in-depth learning process .
   project Github Address :https://github.com/ShusenTang/Dive-into-DL-PyTorch

原网站

版权声明
本文为[Inge]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206231638579319.html