The outputs of LSTMCell as given in the documentation are the hidden state and cell state. How can I extract the output o after ‘T’ time steps?
Link to documentation: http://pytorch.org/docs/master/nn.html#torch.nn.LSTMCell
I’m basically building LSTM Based Encoder Decoder, and I wanted the output of LSTM Encoder, so that I could feed it to Decoder.
The hidden state is the output state.
How is ‘hidden’ state the output state?
Don’t they both differ, as also given in the equations in the documentation?
The vocab is confusing.
The LSTM’s “cell state”
c is a value that the LSTM keeps from one timestep to the next.
The LSTM’s “hidden state”
h is the output from the previous timestep that the LSTM re-uses to calculate the current timestep.
So basically, the “cell state” is hidden but the “hidden state” isn’t.
In the equations
h is the previous output.
h′ is the current output. At the next timestep
h and we calculate a new value.
One potentially confusing detail is the use of the letter
o in one of the equations.
o is the output gate, not the output value.