jwkanggist / self-supervised-learning-narratives-1

거꾸로 읽는 self-supervised learning 파트 1
50 stars 7 forks source link

[4주차] VQ-VAE 코드 분석 #11

Open HwangJohn opened 2 years ago

HwangJohn commented 2 years ago

구현 중인 코드

https://github.com/HwangJohn/vq-vae-test

저자분 코드

참고한 깃헙

참고하면 좋은자료

유튜브 링크

HwangJohn commented 2 years ago
HwangJohn commented 2 years ago
  • [ ] vavae_ema 모드 에서 q_latent_loss 찾기

Because this loss term is only used for updating the dictionary, one can alternatively also update the dictionary items as function of moving averages of (not used for the experiments in this work). For more details see Appendix A.1.

논문의 3.2 Learning 수식 (3) 바로 위 단락에 있는 위 문구에 답이 있는거 같아요. 수식 (3)의 두번째 텀은 EMA로 대체될 수 있다라고 이해했고, 두번째 텀 목적이 codebook 임베딩 벡터 를 인코더 아웃풋들 의 중심과 가깝도록 업데이트 하는 것인데, K-means를 사용하고 싶으나(Appendix. 1), 미니배치 상에서는 전체 데이터에서의 중심점을 알 수 없으니 EMA를 통해서 각 배치마다 의 MA에 가깝도록 를 학습시키게 했네요.

@jwkanggist 위 내용 확인 부탁드려요 :)