nn.LSTMCell inside nn.LSTM?

Does this rnn = nn.LSTM(input_size, hidden_size) mean, it has hidden_size number of nn.LSTMCell() cells inside?

No, hidden_size is the hidden dimension of the LSTM cell.

LSTM is functionally equivalent to writing a loop over your input and feeding it to LSTMCell (modulo the API differences). LSTM exists because the cuDNN library provides a more efficient implementation when you know the full input at the start of the computation. Also, LSTM is more efficient when you are using more than one layer of LSTM cells.

Thanks for replying.
So does it mean it’s just one LSTMCell? (in this case)