Thank you! The code executes just fine and I am not seeing any errors. I just  wanted to be sure that the backpropagation can take into account the sum of the two hidden states from both directions inside the final for loop, which is a little strange operation. I am guessing that for loops and list summations are taken care in autograd and I don’t need to do .unbind() or any other kind of operation. Also I was confused as I am initializing the root variable output as zeros and than I am setting each entry using other varaibles.