Why is that step needed, and how does it help?
Isn’t this step supposed to change the hidden states?
And there is one more confusion.
The main function calls init_hidden() as
hidden = model.init_hidden(eval_batch_size)
Now going by definition of init_hidden, it creates variables of type weight for all parameters associated with the model.
But in the main function init_hidden is used to update only hidden states. Shouldn’t this create size mismatch?
Apologies for all the questions, but I am quite new to pytorch and am probably missing something very basic.