The linked code reshapes the input to:
images = images.reshape(-1, sequence_length, input_size).to(device)

, to create an input tensor of [batch_size, seq_len, nb_features].
In the MNIST example, sequence_length and input_size are both defines as 28, which will basically slice the image and fake the temporal dimension.
I’m not sure, what kind of data you are using, but you should also reshape (or load) the data in the same format.
Apparently you are passing the data as a 2-dimensional tensor (probably [batch_size, nb_features]).