def _reset_parameters(self):
    'Special initialization of certain model weights.'
    nn.init.orthogonal_(self.weight_ih.data)
    weight_hh_data = torch.eye(self.cfg.hidden_size)
    weight_hh_data = weight_hh_data.repeat(1, 3)
    self.weight_hh.data = weight_hh_data
    nn.init.constant_(self.bias.data, val=0)
    if (self.cfg.initial_forget_bias is not None):
        self.bias.data[:self.cfg.hidden_size] = self.cfg.initial_forget_bias
Special initialization of certain model weights.
def _reset_parameters(self):
    
    nn.init.orthogonal_(self.weight_ih.data)
    weight_hh_data = torch.eye(self.cfg.hidden_size)
    weight_hh_data = weight_hh_data.repeat(1, 3)
    self.weight_hh.data = weight_hh_data
    nn.init.constant_(self.bias.data, val=0)
    if (self.cfg.initial_forget_bias is not None):
        self.bias.data[:self.cfg.hidden_size] = self.cfg.initial_forget_bias