Lower Upper Configuration

flood_forecast.transformer_xl.lower_upper_config.initial_layer(layer_type: str, layer_params: Dict, layer_number: int = 1)[source]
flood_forecast.transformer_xl.lower_upper_config.swish(x)[source]
flood_forecast.transformer_xl.lower_upper_config.variable_forecast_layer(layer_type, layer_params)[source]
class flood_forecast.transformer_xl.lower_upper_config.PositionwiseFeedForward(d_in, d_hid, dropout=0.1)[source]

A two-feed-forward-layer module Taken from DSANET repos

__init__(d_in, d_hid, dropout=0.1)[source]

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
class flood_forecast.transformer_xl.lower_upper_config.AR(window)[source]
__init__(window)[source]

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool