Solved by vdw in post #4 
              
              
                With batch_first=True, the shape of lstm_out should be (batch_size, seq_len, num_directions * hidden_size). Since you use 1 layer, it should be (batch_size, seq_len, 200). This you push through a hidden layer, so prediction_out should be (batch_size, seq_len, 100). 
That means that prediction_out[:…