Could you check the shape of x before feeding it into the self.lstm?
Based on the error it might only have two dimensions, while three are expected ([batch_size, seq_len, nb_features] in your case, since you are using batch_first=True).