Loading...
2022. 5. 16. 20:24

transformer의 decoder 구조 알아보기

decoder의 기본 구조는 이렇다. The decoder is also composed of a stack of N = 6 identical layers. In addition to the two sub-layers in each encoder layer, the decoder inserts a third sub-layer, which performs multi-head attention over the output of the encoder stack. Similar to the encoder, we employ residual connections around each of the sub-layers, followed by layer normalization. We also modify the se..

2022. 5. 16. 01:52

transformer에 사용된 warm up learning rate scheduler

1. warm up learning rate scheduler 최적화 알고리즘인 optimizer의 learning rate는 중요한 hyperparameter인데 보통 하나의 값을 선택하고 전 과정동안 그 값으로 학습을 진행함. 그러나 조금 더 빠르게하면서 모델 성능은 높이고 싶다면 학습 중 변경하는 방법도 생각해볼 수 있음 이런 기법을 learning rate scheduling라고 부른다. 학습 중 적절한 방식으로 learning rate를 변경하면서 학습한다. 모델의 성능을 높이고 학습도 빠르게 할 수 있는 여러 기법들이 있다. warm up learning rate scheduler은 transformer에서 사용한다면 학습이 경험적으로 잘 된다고 많은 경우 알려져있다. 2. 직관적으로 warm..

2022. 5. 13. 01:28

transformer에 사용된 positional encoding에 대하여

1. block based model encoding의 마지막 단계로 residual connection, layer normalization 결과를 feed forward network라는 신경망에 넣어 다시 한번 변환을 거친다. 근데 특별히 왜 했다는 이유는 없는듯?? feed forward network후에도 residual connection을 수행하고 layer normalization을 수행하여 최종적인 encoder의 output인 hidden vector를 얻는다. 2. positional encoding 지금까지 연산의 결과는 사실 sequence의 순서 정보를 전혀 고려하지않았다. 직관적으로 당연하다. x1,x2,x3의 q,k,v를 한번에 만들어서 이것으로 attention을 수행하면서..

2022. 5. 10. 21:32

YOLO(You only look once)의 원리 알아보기

1. motivation R-CNN family는 Region proposal을 하고 각각 detection하는 2단계 구조(two-stage detector) 그러나 때로는 정확도를 조금 포기하더라도 real time detection 개념으로 매우 빠르게 실시간에 detection하는 것이 필요할 때가 있다 ROI pooling을 제거하여 single stage로 detection이 가능한 모형들이 등장했다 2. YOLO 먼저 input 이미지를 S*S grid로 나눈다 각각의 grid cell에 대해 B개의 bounding box를 고려한다 각 box에 대한 중앙점의 좌표와 너비,높이 (x,y,w,h) 4개의 위치 모수 그리고 object를 포함하는지 안하는지 confidence score를 계산 ..

2022. 5. 10. 21:21

R-CNN 계열의 network 원리 요약

1. 학습관점 R-CNN은 오직 마지막 단의 SVM classifier만 학습 가능 Fast R-CNN은 첫 feature map을 뽑는 CNN도 학습이 가능 Faster R-CNN은 region proposal network로 모든 과정이 학습 가능 R-CNN에 언급 한번 안한 box regression이 있다는 것이 특이한데 실제로 가능하다고 한다 2. input size 관점 R-CNN은 CNN을 2000번 돌리며 CNN에 들어가는 input size는 고정되어있다 Fast R-CNN 이후는 ROI pooling을 이용하여 CNN의 input size를 임의로 해도 동작하도록 만들었다 3. region proposal 관점 Fast R-CNN까지 region proposal로 selective se..

2022. 5. 5. 19:46

R-CNN에서 가장 발전된 Faster R-CNN에 대하여

1. motivation 이전 fast R-CNN이 region proposal을 selective search로 구해서 학습이 불가능해 성능 향상에 결국 한계가 있다는 점 사실 진정한 object detection 목적이랑 먼저 bounding box 후보군을 선정한다는게 조금 아쉬운 부분 neural network 기반으로 학습 가능한 region proposal을 제안하여 모든 구조가 end-to-end로 학습이 가능하게 만들었다 2. Intersection over Union 두 영역의 합집합에 대하여 겹치는 영역의 비율 3. anchor box 생성한 feature map에서 n*n spatial map(논문에서는 3*3)을 sliding window 시키면서 spatial map의 중앙 포인트..