If you are using batch_first=True in your LSTM, the input shape should be [batch_size, seq_len, nb_features].
I’m not sure, what self.num refers to, but if you want to swap dimensions, you would have to use permute instead of view.