Hi @vdw and @ptrblck,
Thanks for the help. I have refactored the RNN code and fix the net.init_hidden to be inside the inner loop and changes the batch_size to be inputs.shape[0]. I missed out that my models become dependant upon my batch size and hence my expected hidden[0] size changes. Thanks for helping the debugging. It’s working now.