Sung Kim 교수님의 ML / DL for Everyone with PYTORCH 강의 필기내용입니다.
사람이 생각하고 결정하는 방식에 대해 먼저 알아보자.
❓ What to eat for lunch?
❓ What is this picture?
❓ What would be the grade if I study 4 hours?
사람이 생각하는 방식과 같다 !
기계들은 멍청하기 때문에 Image를 줘도 이게 뭔지, 예측해야 하는 값인 CAT이 뭔지도 모른다. 그래서 기계들을 가르쳐줘야 한다. 이 과정을 Training이라 한다.
❗ Machine needs lots of training
Training을 할 때 Image와 true label을 함께 제공한다( Labled dataset ).
Training dataset을 이용해 학습한 후, Test dataset을 던졌을 때 올바른 prediction을 하게끔 만드는 게 목표다.
Intelligence를 가지게 하기 위한 방법 중 하나가 Machine Learning이다.
Machine Learning 안에는 많은 알고리즘이 있는데, 그 중 neural nets 을 사용하는 알고리즘 그룹을 Deep Learning이라 한다.
OS, Package, Programming Language를 선택하면 밑에 커맨드가 나오는데 그걸로 설치하면 된다.
Windows, pip, Python의 경우:
$ pip install torch===1.6.0 torchvision===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
Could not find a version that satisfies the requirement torch==1.6.0+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
Python이 32bit인지 확인하고, 64비트로 바꾸고 하면 된다.
from __future__ import print_function
import torch
x = torch.rand(5, 3)
print(x)
# output like
tensor([[0.3380, 0.3845, 0.3217],
[0.8337, 0.9050, 0.2650],
[0.2979, 0.7141, 0.9069],
[0.1449, 0.1132, 0.1375],
[0.4675, 0.3947, 0.1426]])
설치 끝 😊