RNN Model (Many to one) that predict class question

Hello, I have training input of this size (5000, 142, 30) where (Batch Size, Sequence Length, number of inputs) respectively. And so my output should be (5000, 3). My model should take 30 input numbers 142 times (time series) and then give me one of class output. And this happen with every batch in 5000 batches.
I am just interested is my Model correct for this task? After some tests I assuming it work correctly, but I am still in doubt. The part with star seems to me most questionable.

class Model(nn.Module):
    def __init__(self, input_number, ouput_number, hidden_number, layers_number):
        super().__init__()
        self.hidden_number = hidden_number
        self.rnn = nn.LSTM(input_number, hidden_number, layers_number, batch_first=True)
        self.fc1 = nn.Linear(hidden_number, ouput_number)
    def forward(self, data_in):
        hidden = None
        out, hidden = self.rnn(data_in, hidden)
        out = out[:, -1, : ]   *
        out = out.contiguous().view(-1, self.hidden_number)
        out = torch.sigmoid(self.fc1(out))
        return out, hidden

By the way, my input is changed to (5000(or more), 132, 30) but still this is not changing question.