The new error is raised by an RNN, as a 3-dimensional input is required as described in the docs so you would need to pass it as [seq_len, batch_size, features] in the default setting or [batch_size, seq_len, features], if batch_first is set to True.