嘉渊
2023-05-11 81a5b29804800a4edd76c8dda2727d6fdf4b5643
funasr/models/specaug/specaug.py
@@ -3,15 +3,14 @@
from typing import Sequence
from typing import Union
import torch.nn
from funasr.models.specaug.abs_specaug import AbsSpecAug
from funasr.layers.mask_along_axis import MaskAlongAxis
from funasr.layers.mask_along_axis import MaskAlongAxisVariableMaxWidth
from funasr.layers.mask_along_axis import MaskAlongAxisLFR
from funasr.layers.time_warp import TimeWarp
class SpecAug(torch.nn.Module):
class SpecAug(AbsSpecAug):
    """Implementation of SpecAug.
    Reference:
@@ -100,7 +99,7 @@
            x, x_lengths = self.time_mask(x, x_lengths)
        return x, x_lengths
class SpecAugLFR(torch.nn.Module):
class SpecAugLFR(AbsSpecAug):
    """Implementation of SpecAug.
    lfr_rate:low frame rate
    """