This is how you use with nn.Sequential. I haven’t figure out how to supply initial h0 yet, so don’t pass h0 in, it will init as default
rnn = nn.Sequential(
    nn.LSTM(10, 20, 2)
 )
input = Variable(torch.randn(100, 3, 10))
h0 = Variable(torch.randn(2, 3, 20))
c0 = Variable(torch.randn(2, 3, 20))
output, hn = rnn(input)

If you want to pass h0 (also, you must pass c0 with h0), perhaps you should let lstm outside nn.Sequential
lstm =  nn.LSTM(10, 20, 2)
input = Variable(torch.randn(100, 3, 10))
h0 = Variable(torch.randn(2, 3, 20))
c0 = Variable(torch.randn(2, 3, 20))
output. hn = lstm(input, (h0,c0)) # omit both h0, c0, or must pass a tuple of both (h0, c0).