I am relatively new to DL and Pytorch, so may be I am off the topic, but as “model.init_hidden()” is used to initialize the weight Matrix to random values or to 0 according to your defined function. Initialization is  not required while testing, as we would already have set of well performing hyperparameters on training data, we would just load the saved parameters and test the data, the parameters doesn’t require to be initialized again. So, init_hidden() would only be required when training.