Hi @Abhishek_Arya,
nn.LSTM(inputSize, hiddenSize,rho) can return 2 variables instead of 1
lstm, recent_hidden=nn.LSTM(inputSize, hiddenSize,rho)
lstm will contain the whole list of hidden states
while recent_hidden will give u the last hidden state.
print(lstm:getHiddenState(1)) – not sure what function will this be, but if you print out lstm and recent_hidden, it will on the last row of lstm, the values should be the same as recent_hidden.
Hope it helps