espnet2.layers.mask_along_axis.mask_along_axis
Less than 1 minute
espnet2.layers.mask_along_axis.mask_along_axis
espnet2.layers.mask_along_axis.mask_along_axis(spec: Tensor, spec_lengths: Tensor, mask_width_range: Sequence[int] = (0, 30), dim: int = 1, num_mask: int = 2, replace_with_zero: bool = True)
Apply mask along the specified direction.
- Parameters:
- spec – (Batch, Length, Freq)
- spec_lengths – (Length): Not using lengths in this implementation
- mask_width_range – Select the width randomly between this range