= encoder - decoder attention
-self attention : 이미 생성한 단어들 간의 문맥
-cross attention : encoder 결과에서 필요한 정보 가져옴
-Q는 decoder의 현재 상태에서
-K, V는 encoder의 출력(hidden state, 은닉 벡터)에서 가져옴
-이미지를 cnn대신 transformer로 처리
-이미지를 patch로 분할해 transformer encoder 입력으로 넣음
-self attention을 통해 전역 정보를 병렬로 학습 가능 -> 대규모 dataset에서 유리
1. 입력 이미지 패치 분할
2. linear projection of flattened patches
3. class token(이미지 전체를 대표하는 임베딩)과 위치 임베딩(위치 정보 제공)
4. 초기 임베딩 z0
*LN : 입력 벡터 (길이 D) 단위로 평균 / 분산 계산
https://drive.google.com/file/d/1ZiZfi3HbG8cdSnb764WAhlruhZm2Qe7J/view?usp=sharing
ViT 코드 구현_간략.ipynb
Colab notebook
drive.google.com
https://drive.google.com/file/d/1wLCeDSMdute--SVDnyVMb1kSTA9MWuPZ/view?usp=sharing
인코더_디코더_모델.ipynb
Colab notebook
drive.google.com
댓글 영역