def __init__(self, cfg: Config):
    super(EALSTM, self).__init__(cfg=cfg)
    self._hidden_size = cfg.hidden_size
    input_size_stat = len(((cfg.static_inputs + cfg.camels_attributes) + cfg.hydroatlas_attributes))
    if cfg.use_basin_id_encoding:
        input_size_stat += cfg.number_of_basins
    if cfg.embedding_hiddens:
        self.input_gate = FC(cfg=cfg)
    else:
        self.input_gate = nn.Linear(input_size_stat, cfg.hidden_size)
    self.dynamic_gates = _DynamicGates(cfg=cfg)
    self.dropout = nn.Dropout(p=cfg.output_dropout)
    self.head = get_head(cfg=cfg, n_in=cfg.hidden_size, n_out=self.output_size)
def __init__(self, cfg: Config):
    super(EALSTM, self).__init__(cfg=cfg)
    self._hidden_size = cfg.hidden_size
    input_size_stat = len(((cfg.static_inputs + cfg.camels_attributes) + cfg.hydroatlas_attributes))
    if cfg.use_basin_id_encoding:
        input_size_stat += cfg.number_of_basins
    if cfg.embedding_hiddens:
        self.input_gate = FC(cfg=cfg)
    else:
        self.input_gate = nn.Linear(input_size_stat, cfg.hidden_size)
    self.dynamic_gates = _DynamicGates(cfg=cfg)
    self.dropout = nn.Dropout(p=cfg.output_dropout)
    self.head = get_head(cfg=cfg, n_in=cfg.hidden_size, n_out=self.output_size)