Solved by richard in post #2 
              
              
                Thanks for the question, @liqun. 
The problem looks like you’re passing None as the hidden: 
def rnn_loop(x):
hidden = None
**for** x_t **in** x.split(1):
x, hidden = model(x_t, hidden)

However, you’re not handling None hidden values in your model. 
Please see the following file https://github.com/…