1. Deep vs. Machine learning
A. Shallow learning vs. Deep learning
- Shallow learning
- only has one layer
- feature : vector
- Deep learning
- has more than one layer
- use Gradient Descent
- over fitting problem

imput image(224 x 224 x 3) : width x height x channel
B. Advantage of Deep learning
- Extract optimal representation via End-to-End learning
- 머신러닝은 각각의 task마다 새로운 모델 design 필요
- 딥러닝은 다른 task에서도 괜찮은 표현력
- Non-linearity
- Deep learning can represent non-linear data
- Most computer vision applications invlove data which requires non-linear mappings
- 내가 생각한 고전 ML과 비교한 장점
- End-to-End learning
- 자동으로 feature를 추출해서 학습
- 새로운 task에 쉽게 적응가능(transfer learning)
- 고전 ML은 일정수준에서 성능 향상 x, 딥러닝은 데이터와 코델 크기 커질수록 계속 성능 향상
2. CNNs(Convolutional Neural Networks)
# RGB image \(\rightarrow\) Any Differentiable Layers(learnability) \(\rightarrow\) Semantic labels
A. Differentiable layers and Gradient descent
# \(I\) \(\rightarrow\) layer \(h\) \(\rightarrow\) \(X\)
\(\rightarrow\) Any Differentiable intermediate Layer \(f\) whose parameter is \(\theta\)
\(\rightarrow\) \(y\) \(\rightarrow\) layer \(g\)(loss function) \(\rightarrow\) Loss \(L\)(distance btw ground truth & prediction)
- forward rule(순전파) : \(y = f(h(I);\theta)\:\:\) for \(\:\: g(f(h(I);\theta))=L\)
- backward rule(역전파) : \(\frac{dL}{dI} = \frac{dX}{dI} \times \frac{dy}{dX} \times \frac{dL}{dy}\)
- parameter update rule : \(\theta^{new} = \theta - \epsilon(\text{learning rate})\frac{dy}{d\theta}\times\frac{dL}{dy}\)
B. CNN architecture
- 2D Convolution


- 하이퍼 파라미터 Stride =2로 지정하면 2칸씩 움직임

- 입력이 3채널(RGB) 이면 filter도 3채널
- 각 채널마다 다른 가중치
- ex) 3x3 vlfxjdlaus (3,3,3) - 27개의 가중치 존재
- n개의 filter를 사용해 n개의 feature map 생성
- 입력 h,w,3 \(\rightarrow\) ?,?,n
- Pooling

- Max pooling & Average pooling

- Activation layer

- 최종 CNN shape 요약
