-
PyTorch 설치Deep Learning/PyTorch 2021. 6. 1. 20:54728x90
PyTorch로고
PyTorch 설치
1. 파이토치 홈페이지 접속
PyTorch Korea User Group
(Unofficial) Korean user community for PyTorch which is an open source machine learning framework that accelerates the path from research prototyping to production deployment.
pytorch.kr
2. "시작하기" 클릭
3. 자신에게 맞는 버전, OS등 선택
나는 안정화된 1.8.1버전,
OS는 Windows,
anaconda를 사용하기 때문에 conda,
python 언어를 사용하기에 Python
GPU와 연동해주는 CUDA 11.1 버전을 선택했다. (CUDA는 따로 설치하여야한다.)
4. 이 명령을 실행하세요: conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia
자신이 선택한 옵션에따라 명령은 달라질 수 있다.
$ conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia
5. 자연어 처리 도구인 torchtext 설치
$ pip install torchtext
6. numpy, matplotlib, scikit-learn 설치
$ pip install numpy matplotlib scikit-learn
예제 코드 실행
이 책의 깃허브 저장소에서 예제를 다운로드 받아왔다.
$ git clone https://github.com/keon/3-min-pytorch.git
끝!!!
(추가)
사실 한번에 안됐따. torchvision이 미설치 되었단다..
보통은 이명령을 실행하면서 torchvision이 다운로드 되어야하는데 왜 인지는 잘 모르겠다.
pip를 이용해 다시 다운로드 받으니 정상 실행되었다.
$ pip install torchvision
728x90'Deep Learning > PyTorch' 카테고리의 다른 글
PyTorch | GAN (4) 2022.01.09 PyTorch | DNN (0) 2021.06.20 Pytorch | ANN (0) 2021.06.12 PyTorch | 이미지 복원 (0) 2021.06.04 Pythrch | 기초 (0) 2021.06.01