The lstm output (out) has shape (seq_len, batch, hidden_size). c.f https://discuss.pytorch.org/t/understanding-output-of-lstm/12320/2
The linear layer expects inputs of shape (batch, any, number, of, extra, dims, features). So I think your linear layer is using the timesteps as though they were batches and up the batches as though they were timesteps. That said, for the code snippets you posted to actually work the Linear layer must be automatically combining some dimensions of its input and I didn’t know that it could do that.
To correct this you need to declare the linear layer to take inputs with self.hidden_dim*seq_len features.
# in __init__()
self.cl = nn.Linear(self.hidden_dim*seq_len, self.num_labels)

Then you need to permute the dimensions of out to bring the batch dimension into the first place, and finally flatten the time & feature dimensions otherwise the linear layer will output too many dimensions.
# in forward()
input_to_cl = out.permute(1, 0, 2).view(-1, self.hidden_dim*len(x))`