Unfortunately, it seems that we have to make a for loop, giving at each step the last output as a new input (one example here: http://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html 137).
Maybe there is already a way to make this without a hand-made loop, but I don’t know how.
One of my projects is to implement such a “self-feeding LSTM”, going into the underlying C code. I need to find the time.