Yes, you could permute it and you should check the output shape of the self.lstm_one.
Based on the used config I assume the output would have the shape [batch_size, seq_len, nb_features]. If that’s the case, you could feed it into the linear layer and would then get an output in [batch_size, seq_len, out_features=num_classes]. Permute this output of the linear layer, and pass it to the log softmax (if you are using nn.NLLLoss) or remove the log softmax and pass it directly to nn.CrossEntropyLoss.