espnet2.asr.state_spaces.components.TransposedLN
Less than 1 minute
espnet2.asr.state_spaces.components.TransposedLN
class espnet2.asr.state_spaces.components.TransposedLN(d, scalar=True)
Bases: Module
Transposed LayerNorm module.
LayerNorm module over second dimension Assumes shape (B, D, L), where L can be 1 or more axis
This is slow and a dedicated CUDA/Triton implementation shuld provide substantial end-to-end speedup
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(x)
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.