Solved by harshildarji in post #2 
              
              
                Hey all, 
Just as an update, I solved this problem by changing the initialization of nn.RNNCell from forward to __init__ method. 
Thank you.