The output of your lstm layer is [batch_size, seq_length, features].
In this line of code:
lstm_out  = lstm_out.contiguous().view(-1, self.hidden_dim)

you collapse the sequence length into the batch dimension, which creates the new shape of [210, 10].
Based on the error message it looks like your target has a batch size of 21, and I’m currently not sure, how your current use case is supposed to work.
Would you like your model to output only a single prediction for each sequence or one prediction for each time step?