Sir the first function get_initial_state() - gives initial_state (h_0)
whereas second function single_step(self, context, word_id) - gives log_prob (output probability) rnn_states (h_(n-1):h_1) and output (h_n)
Sir correct me if I am wrong. Sir I need these in Pytorch…
So, I have stored…
traced_script_module = torch.jit.trace(model, (train_data, hidden))
traced_script_module.save(‘newmodel.pt’)
I will be using it in C++
It is for Pytorch-Kaldi Language Model rescoring…