Thank you for your answer.
Just to confirm, you’re saying that I should detach the hidden state in the input of the lstm layer from the decoder class, right?
And what is the proper way of detaching the hidden state if it is a tuple? I’ve tried to do it as you suggested but I’m getting the following:
AttributeError: 'tuple' object has no attribute 'detach'

Thank you,