Hi.
LSTM is type of Recurrent Neural Networks, so current output (output at time t) will affect on processing of input at time t+1 (each input at specific time known as time-step)
In according to above explanation, we need two ht (one for next layer and one for next time-step).
I think this diagram can help you:
in pytorch, lstm has three outputs:
output: what we use it for next or output layer.
h_n: same output (when we need it to use for next time-step), known as hidden-state
c_n: cell-state (upper horizontal line with two operators on it _ multiplication and sum)