티스토리 뷰

(이 글은 ubuntu 18.04를 기준으로 하고 있습니다)

 

 

pip이용하여 pytorch 설치하기

 

- CUDA 10.2

pip3 install torch torchvision torchaudio

(나는 개인적으로 pip를 저렇게 안쓰고 

python3 -m pip install torch torchvision torchaudio

이렇게 사용한다. pip version이 python version과 안맞는걸 미연에 방지하기 위해서..)

 

- CUDA 11.1

pip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

 

cuda 버젼에 따라 stable한 torch version이 다른건지 공식 홈페이지에 command가 다르게 나와있다.

https://pytorch.org/

 

PyTorch

An open source machine learning framework that accelerates the path from research prototyping to production deployment.

pytorch.org

 

 

+) source code build

pytorch 뜯어보려면 source code build를 해야한다.

예전에 한참 pytorch 뜯어볼 때가 있었는데.. 가물가물하다.

 

https://github.com/pytorch/pytorch#from-source

 

GitHub - pytorch/pytorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration

Tensors and Dynamic neural networks in Python with strong GPU acceleration - GitHub - pytorch/pytorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration

github.com

공식 github의 Readme 따라 설치하면 설치가 잘 됐던걸로 기억.

갠적으로 conda 쓰는거 싫어하는데 대부분 Conda 이용한 install이 나와있다.. 그러나 나는 따르지 않지.

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함