espnet2.asr.frontend.cnn.Dim1LayerNorm
Less than 1 minute
espnet2.asr.frontend.cnn.Dim1LayerNorm
class espnet2.asr.frontend.cnn.Dim1LayerNorm(normalized_shape, eps=1e-05, elementwise_affine=True, bias=True)
Bases: Module
LayerNorm on middle dim.
It assumes the input is shape B, D, T to avoid transposing. Faster than TransposedLayerNorm, but may lead to minor numerical differences.
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.