The nn.LSTM layer’s sequence_output will have the shape [batch_size, seq_len, nb_features] (in the batch_first=True setup) as described in the docs.
The following linear layer will thus be applied to all time steps in the seq_len dimension and will return [batch_size=32, seq_len=62, nb_features=D_out=2].
nn.CrossEntropyLoss will understand this shape as [batch_size, nb_classes, additional_dim] and expects the target to have the shape [batch_size, additional_dim].
I assume you would like to use the last time step only, so you could index the lstm output via sequence_output[:, -1] or reduce this tensor in any other way.