我试图理解这里提到的 char lstm 示例 - char-lstm julia 示例
函数 lstm_cell 接受第二个参数作为先前状态 -
function lstm_cell(data::mx.SymbolicNode, prev_state::LSTMState, param::LSTMParam;num_hidden::Int=512, dropout::Real=0, name::Symbol=gensym ())
但是,在部分 - #stack LSTM 单元
next_state = lstm_cell(hidden, l_state, l_param, num_hidden=dim_hidden, dropout=dp,name=Symbol(name, " lstm $t"))
hidden = next_state.h
layer_param_states[i] = (l_param, next_state)
layer_param_states[i] 使用下一个状态进行更新
- layer_param_states[i] = (l_param, next_state)
为什么在这里这样做。为什么用下一个状态更新前一个状态。