do I need to initialize lstm hidden state when in validation and test set? or just reset it to zero
On training, it is good to initialize hidden state instead of setting it  to 0. But I wonder whether initialize hidden state on validation and testing is good or bad. Thanks

There's absolutely no reason for custom initializing hidden states to zeros; this is actually the case: 

def forward(self, input, hx=None):
    ...

    if hx is None:
        num_directions = 2 if self.bidirectional else 1
        hx = torch.zeros(self.num_layers * num_directions,
                         max_batch_size, self.hidden_size,
                         dtype=input.dtype, device=input.device)
    else:
        # Each batch of the hidden state should match the input sequence that
        # the user believes he/she is passing in.
        hx = self.permute_hidden(hx, sorted_indices)


It checks first if you have passed any custom hidden states values, if you did not, it initializes it to zeros.



Also, you usually, theoretically speaking, do not need to initialize the model's hidden states in the testing mode (either randomly or using predefined values). 
