terminator.models.layers.s2s_modules.Normalize¶
- class terminator.models.layers.s2s_modules.Normalize(features, epsilon=1e-06)[source]¶
Bases:
Module- __init__(features, epsilon=1e-06)[source]¶
Initializes internal Module state, shared by both nn.Module and ScriptModule.
Methods
__init__(features[, epsilon])Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(x[, dim])Defines the computation performed at every call.
Attributes
T_destinationalias of TypeVar('T_destination', bound=
Mapping[str,Tensor])dump_patchesThis allows better BC support for
load_state_dict().- forward(x, dim=- 1)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.