
Recurrent Neural Network 에 대해서 알아보겠습니다.
왼쪽부터 살펴보면 vanilla neural network 의 경우 이미지 또는 벡터를 input으로 받습니다. input 하나가 hidden layer를 거쳐서 output 하나를 만들어냅니다.
machine learning 관점에서는다양한 문제를 해결하기 위해 network가 좀 더 유연해질 필요가 있습니다. 그렇기 때문에 RNN을 사용하여 다양한 input, output을 다룰 수 있습니다.
one to many
input은 이미지와 같은 하나의 input이고, ouput은 캡션과 같은 variable output입니다.
e.g. Image captioning (image → sequence of words)
many to one
variable input이 들어오고, 하나의 output을 얻어냅니다.
e.g. Sentiment classification (sequence of words → sentiment)
many to many
input과 output 모두 variable합니다.
e.g. Machine translation (sequence of words → sequence of words)
e.g. Video classification on frame level

위의 예시는 fixed input, output이지만 sequential processing이 있는 경우입니다.
fixed input인 숫자 이미지가 있고 몇인지를 맞추게 될텐데, 이미지를 하나를 forward pass로 한번에 결정하는 것이 아니라 이미지의 여러 부분을 조금씩 확인(glimpses)한 후 최종적으로 label을 결정합니다.