Could you post the shape of embeddings before feeding it to self.lstm?
It seems that you are not permuting the input to this layer and don’t set batch_first=True, which might yield a wrong output and this error.