Change the loop order in cache/predict of the AutoEncoder to allow convolutional layers with non-array output in layers