CNN - 1x1 convolution의 중요성

5개 Network 들의 주요 아이디어와 구조


1️⃣ AlexNet

image.png

💡 key ideas

  • Rectified Linear Unit(ReLU) activation 사용
  • 2개의 GPU 사용
  • Local response normalization, Overlapping pooling
  • Data augmentation
  • Dropout

ReLU Activation

image.png

  • Linear model이 가지는 좋은 성질을 가지고 있다.
  • 최적화가 쉽다.
  • 사라지는 그래디언트 문제를 해결



2️⃣ VGGNet

image.png


💡 key ideas

  • 3x3 convolution filters(with stride 1)사용
  • fully connected layers에 1x1 convolution 사용
  • Dropout(p=0.5)


🤔 왜 3x3 convolution?

filter의 크기가 커짐으로써의 이점은 한번의 convolution으로 filter가 찍었을때, 고려되는 input의 크기가 커진다는 것이다. 이것이 Receptive field를 말한다. 하나의 convolution feature map값을 얻기 위해서 고려할 수 있는 입력의 special dimension이다. 그러면 3x3의 filter가 두번 이루어 지게 되는것과 5x5 filter 한번 이루어지는것이 Receptive field에서는 같은 것이 된다.

image.png

그러면 위처럼 진행해 볼 수 있는데, parameter의 개수를 보게되면 5x5 filter를 사용하는 것이 더 많은 parameter을 사용하게 된다. 따라서 3x3의 filter를 사용하는 것이 parameter수를 줄일 수 있다.


3️⃣ GoogLeNet

image.png


💡 inception blocks

image.png

  • 사용 이점은 parameter의 수를 줄일 수 있다.

✅ 어떻게 1x1 Conv를 더 사용했는데 parameter수를 줄일 수 있을까?

  • 1x1 convolution은 channel방향 dimension을 줄일 수 있다.

먼저 input의 크기는 고려하지 않고 filter랑 channel수만 보도록 하자

image.png

1x1 filter를 통해서 channel의 수를 줄였다. 채널방향으로 정보를 줄인 것이다. 그리고 3x3 filter를 사용하여 parameter를 확인해 보면 위와 같은 결과가 나온다. 입력과 출력의 크기만 보면 똑같지만 내부적으로 parameter의 수를 줄일 수 있다.


4️⃣ ResNet

  • parameter의 숫자가 많으면 Overfitting이 일어나게 된다.

하지만 아래의 경우는 아니다!!

image.png

위 경우는 train error가 줄면서 test error도 같이 줄기때문에 Overfitting은 아니다 하지만 layer가 많아지면서 학습을 못시키는 경우이다. 이 문제를 해결하기 위해 ResNet은 identity map을 추가했다.


💡 identity map(skip connection)

image.png

이 convolution layer가 학습하고자 하는 것은 그 차이만 학습하게 되는 것이다.

image.png

이렇게 이용하면 더 깊게 쌒아도 학습이 잘 된다는 것을 알 수 있다.



image.png

이렇게 스킵하게 되면 결과값하고 차원을 맞춰줘야 하기 때문에 1x1 Conv 사용해서 맞춰준다.


Bottleneck architecture

image.png

1x1 Conv를 통해서 차원을 줄인 후 계산하고 다시 차원을 맞춰준다.


5️⃣ DenseNet

image.png

DenseNet은 추가 말고 연결을 한다.


💡 Dense Block & Transition Block

  • Dense Block
    • 각 층의 feature map을 합친다.
    • 이러면 채널의 수가 기하급수적으로 늘어난다.
  • Transition Block
    • BatchNorm → 1x1 Conv → 2x2 AvgPooling
    • 차원을 축소

image.png



Summary

  • ### VGG: repeated 3x3 blocks
  • ### GoogLeNet: 1x1 convolution
  • ### ResNet: skip-connection
  • ### DenseNet: concatenation

'AI > 이론' 카테고리의 다른 글

Transformer - Sequential Models  (0) 2021.02.04
RNN - Sequential Models  (0) 2021.02.04
RNN 맛보기  (0) 2021.02.04
Computer Vision Applications  (0) 2021.02.03
CNN - Convolution  (0) 2021.02.03
CNN Preview  (0) 2021.02.02
Optimization  (0) 2021.02.02
뉴럴 네트워크 - MLP(이론)  (0) 2021.02.01

+ Recent posts