Thanks, that’s sounds like a good idea. As an alternative, I made my decoder accept the Boolean input argument  predict. When this argument is true, the input of each time step becomes the output of the previous time step. I think this is more memory efficient, given that I am running these models on a GPU. But then again, I assume the weights do not consume so much memory unless the model has many layers.