과거 정보를 보존할지 망각할지 결정한다.
망각 게이트 구조
수식)
$$ f_t=\sigma(W^h_1h_{t-1}+W^x_1x_t])\\ c_t=f_t \times c_{t-1} $$
현재 정보($x_t$)를 반영할지 말지 결정한다.
입력 게이트 구조
수식)
$$ i_t = \sigma(W^h_2h_{t-1}+W^x_2x_t)\\ \tilde{C_t} = tanh(W^h_3h_{t-1}+W^x_3x_t) \\c_t=(f_t\times c_{t-1})+(i_t\times \tilde{C_t}) $$
새로운 hidden state (=$h_t$) 를 출력한다.
출력 게이트 구조
수식)
$$ o_t= \sigma(W^h_4h_{t-1}+W^x_4x_t) \\c_t=(f_t\times c_{t-1})+(i_t\times \tilde{C_t}) \\h_t=o_t\times c_t $$