Solved by vdw in post #4 
              
              
                Hm, not sure why the loop would be a problem. The heaving lifting is still done under the hood by PyTorch. I would also assume that when you give a sequence the nn.LSTM that internally it also just loops over each item. 
Maybe another alternative – again, I haven’t tried it: 

Treat a sequence of im…