terminator.models.layers.gvp.LayerNorm

class terminator.models.layers.gvp.LayerNorm(dims)[source]

Bases: Module

Combined LayerNorm for tuples (s, V). Takes tuples (s, V) as input and as output.

__init__(dims)[source]

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

Methods

__init__(dims)

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

forward(x)

param x:

tuple (s, V) of torch.Tensor,

Attributes

T_destination

alias of TypeVar('T_destination', bound=Mapping[str, Tensor])

dump_patches

This allows better BC support for load_state_dict().

forward(x)[source]
Parameters:

x – tuple (s, V) of torch.Tensor, or single torch.Tensor (will be assumed to be scalar channels)