Learning Deep Features for Discriminative Localization
General Convoluitonal Neural Network
CNN의 마지막 레이어를 FC-Layer로 Flatten → 각 픽셀들의 위치 정보를 잃게 됨
FC Layer 대신에, GAP(Global Average Pooling)을 적용
CAM의 결과

CAM의 작동 이유
Architecture

GAP Layer
각각의 Feature Map마다 Gloval Average Pooling(각 Feature Map에 포함된 모든 원소 값을 평균함)을 시행
결과 → GAP Layer로 들어오는 Feature Map의 Channel 수와 동일한 길이의 벡터를 얻음
GAP Layer 이후 FC Layer가 붙어 있음 → GAP에서 출력한 벡터를 Input으로 넘겨줌
각 FC Layer의 가중치는 학습을 통해 구함
Example
