how to build a multidimensional autoencoder with pytorch ...
https://stackoverflow.com/questions/56421065/how-to-build-a...03.06.2019 · Recurrent N-dimensional autoencoder. First of all, LSTMs work on 1D samples, yours are 2D as it's usually used for words encoded with a single vector.. No worries though, one can flatten this 2D sample to 1D, example for your case would be:. import torch var = torch.randn(10, 32, 100, 100) var.reshape((10, 32, -1)) # shape: [10, 32, 100 * 100]