| | |
| | | import math |
| | | import torch |
| | | from typeguard import check_argument_types |
| | | from typing import Sequence |
| | | from typing import Union |
| | | |
| | |
| | | dim: Union[int, str] = "time", |
| | | replace_with_zero: bool = True, |
| | | ): |
| | | assert check_argument_types() |
| | | if isinstance(mask_width_range, int): |
| | | mask_width_range = (0, mask_width_range) |
| | | if len(mask_width_range) != 2: |
| | |
| | | dim: Union[int, str] = "time", |
| | | replace_with_zero: bool = True, |
| | | ): |
| | | assert check_argument_types() |
| | | if isinstance(mask_width_ratio_range, float): |
| | | mask_width_ratio_range = (0.0, mask_width_ratio_range) |
| | | if len(mask_width_ratio_range) != 2: |
| | |
| | | replace_with_zero: bool = True, |
| | | lfr_rate: int = 1, |
| | | ): |
| | | assert check_argument_types() |
| | | if isinstance(mask_width_range, int): |
| | | mask_width_range = (0, mask_width_range) |
| | | if len(mask_width_range) != 2: |