It would help to know how you are encoding your input. From the RNNs I’ve built in the past, having an input tensor of (batch_size, max_sentences, max_words, embdding_dim) seems redundant. One-hot encoded text would have a shape of (batch_size, seq_len, vocab_size) which can be passed as input to an nn.LSTM layer that had been instantiated with the batch_first parameter set to True. You could also have a label encoded tensor of shape (batch_size, seq_len) where each value in the tensor is an index of your vocabulary. This can be used as input to an nn.Embedding layer which would output a tensor with a shape of (batch_size, seq_len, embedding_dim).