[ 딥러닝 ] LSTM
Updated:
Long Short Term Memory (LSTM)
- RNN의 hidden state에 cell state를 추가한 구조
- cell state : 유용한 정보만 저장한다.
- 입력
- input
- previous cell state
- previous hidden state (output)
- 출력
- output (혹은 hidden state)
- next cell state
- next hidden state
Forget Gate
- $\sigma$ : sigmoid function
- 어떤 정보를 cell state에서 제거할 것인가?
Input Gate
- 어떤 정보를 cell state에서 더해줄 것인가?
- $i_t$ : 현재 정보를 cell state에 올릴지 말지 결정
- $\tilde{C}_t$ : 현재 정보와 이전 output으로 얻어지는 cell state candidate
Update Cell
- forget gate와 input gate를 통과한 결과들을 가지고 cell state를 업데이트한다.
- cell state에 대한 정보는 cell 밖으로 나가지 않는다.
Output Gate
- 어떤 정보를 읽을 것인가?
- 업데이트 된 cell state를 기반으로 결과를 출력시킨다.