def __init__(self, cfg: Config):
    super(_DynamicGates, self).__init__()
    self.cfg = cfg
    self.weight_ih = nn.Parameter(torch.FloatTensor(len(cfg.dynamic_inputs), (3 * cfg.hidden_size)))
    self.weight_hh = nn.Parameter(torch.FloatTensor(cfg.hidden_size, (3 * cfg.hidden_size)))
    self.bias = nn.Parameter(torch.FloatTensor((3 * cfg.hidden_size)))
    self._reset_parameters()
def __init__(self, cfg: Config):
    super(_DynamicGates, self).__init__()
    self.cfg = cfg
    self.weight_ih = nn.Parameter(torch.FloatTensor(len(cfg.dynamic_inputs), (3 * cfg.hidden_size)))
    self.weight_hh = nn.Parameter(torch.FloatTensor(cfg.hidden_size, (3 * cfg.hidden_size)))
    self.bias = nn.Parameter(torch.FloatTensor((3 * cfg.hidden_size)))
    self._reset_parameters()