espnet.nets.pytorch_backend.frontends.feature_transform.GlobalMVN
Less than 1 minute
espnet.nets.pytorch_backend.frontends.feature_transform.GlobalMVN
class espnet.nets.pytorch_backend.frontends.feature_transform.GlobalMVN(stats_file: str, norm_means: bool = True, norm_vars: bool = True, eps: float = 1e-20)
Bases: Module
Apply global mean and variance normalization.
- Parameters:
- stats_file (str) – npy file of 1-dim array or text file. From the _first element to the {(len(array) - 1) / 2}th element are treated as the sum of features, and the rest excluding the last elements are treated as the sum of the square value of features, and the last elements eqauls to the number of samples.
- std_floor (float)
Initialize Global MVN.
extra_repr()
Append an extra string representation.
forward(x: Tensor, ilens: LongTensor) → Tuple[Tensor, LongTensor]
Calculate GlobalMVN forward propagation.