ROKO

[coursera] Convolutional Neural Networks: Week 1 본문

Artificial Intelligence/Deep Learning

[coursera] Convolutional Neural Networks: Week 1

RO_KO 2024. 7. 2. 16:38
728x90

컴퓨터 비전의 가장 큰 문제중 하나는 input size가 매우 크다는 것이다. 고화질의 사진일수록 하나의 이미지에 구성되는 화소가 많으므로 많은 연산량이 필요하다. 그러면 가중치는 매우 커지고 모델이 과적합 될 확률이 높아지는데 이를 완화화기 위한 고해상도 이미지 데이터를 모델에 필요한 만큼 구하기는 쉽지 않다.

 

이미지가 주어졌을때 이미지에 대한 특징을 추출하는 기본적인 방법은 수직 방향, 수평 방향 가장자리 (vertical, horizontal edge)를 구하는 것이다.

python 에서는 * (convolution, element-wise multiplication) 연산자로 표현한다.

  • I: height, width size
  • F: filter size (위치 파악을 위해 주로 홀수로 사용)
  • P: padding size (shrinking output, throwing away into from edge)
  • S: stride.

Convolutions on RGB images

Notation

  • \(f^{[l]}\): filter size
  • \(p^{[l]}\): padding
  • \(s^{[l]}\): stride
  • \(n_c^{[l]}\): number of filters
  • Each filter: \(f^{[l]}\times f^{[l]} \times n^{[l-1]}_c \)
  • Activation: \(a^{[l]}= n^{[l]}_H \times n^{[l]}_w \times n^{[l]}_c \)
  • Weights: \( f^{[l]} \times f^{[l]} \times n^{[l-1]}_c  \times  n^{[l]}_c \)
  • bias: \( n^{[l]}_c =(1,1,1, n^{[l]}_c)\)

Types of layer in a convolutional network

  • Convolution
  • Pooling (max pooling, average pooling)
  • Fully connected

average pooling은 깊은 층에서 사용할 경우 추출된 특징 모두 희석되어 의미가 사라질수도 있다. 따라서 max pooling을 주로 사용한다. pooling learnable parameter 없이 hyperparameter인 filter size와 stride만 정하면 되기 때문에 매우 효율적인 구조다.

Why convolution?

Parameter sharing: A feature detector that's useful in one part of the image is probably useful in another part of the image.

 

Sparsity of connections: In each layer, each output value depends only on a small number of inputs (capture translate invariance)

728x90
Comments