PyTorch下載安裝

PyTorch下載安裝
PyTorch下載安裝
PyTorch下載安裝
PyTorch下載安裝

『Torch』基於神經網络人工智慧輵, 『PyTorch』係『Python』版本

首先确認NVIDIA顯卡支持CUDA版本. 下載最新顯卡驅動『552.22-desktop-win10-win11-64bit-international-nsd-dch-whql.exe』

 

網络安装『PyTorch

  1. 進『命令行模式CMD
pip3 install torch torchvision torchaudio –index-url https://download.pytorch.org/whl/cu121

 

本地安装『PyTorch

  1. 進『命令行模式CMD
  2. 行『NVIDIA-SMI.exe
  3. 确認『torch版』+『cuda版』+『python版』+『win/linux版』
  4. 部機『torch-2.3.0』+『cuda-12.4』+『python-3.10.6』+ 『Win-x64』
  5. 版本配對『cp=python』,『cu<=cuda』
https://download.pytorch.org/whl/torch/
  1. 直接将『.whl』下載落蒞直接本地安裝『torch-2.3.0+cu121-cp310-cp310-win_amd64.whl
https://download.pytorch.org/whl/cu121/torch-2.3.0%2Bcu121-cp310-cp310-win_amd64.whl#sha256=002027d18a9c054f08fe9cf7a729e041229e783e065a71349015dcccc9a7137e
  1. 將『.whl』摆係『D:』碟.
  2. 管現員身份進入命令行模式cmd
  3. 『pip install whl “d:\torch-2.3.0+cu121-cp310-cp310-win_amd64.whl”』
  4. 檢查最新版pip時出錯.
WARNING:There was an error checking the latest version of pip.
  1. 管現員身份進入命令行模式cmd
Defaulting to user installation because normal site-packages is not writeable
  1. 手動升級pip至最新版. 以管理員身份𢴇行.
python -m pip install –upgrade pip

測試『Pytorch』返回true,表示可調用GPU-CUDA指令, 進入『Pytho3.10』.

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

 

缷載tcrch

Pip uninstall torch
Pip uninstall torchaudio torchvision
Pip uninstall torch-geometric torch-scatter torch-sparse torch-cluster torch-spline-conv

 

https://pytorch.org/get-started/locally/
https://pytorch.org/get-started/previous-versions/

 

發佈留言