transformer 간단요약2 - encoder, attention, positional encoding, decoder
1. encoder encoder는 self attention 구조와 feed forward Neural Network 구조의 두개의 sub layer로 구성되어 있다 단어 입력의 경우에는 먼저 embedding vector로 변환하는 것이 기본이다. 당연하지만 word embedding은 맨 밑단 첫 입력에서만 일어남 벡터 크기는 hyperparameter로 적절하게 정한다고 한다. embedding된 벡터 각각은 자기만의 경로를 따라 encoder를 지나간다 위에서 보면 첫 통과 layer로 self attention을 지나가는데 도대체 무슨 일이 일어날까? 예를 들어보면 ‘The animal didn’t cross the street because it was too tired.’을 생각해보자. 이..