Skip to content

Commit d91c5ad

Browse files
committed
add image for specaugment.
1 parent ba1698b commit d91c5ad

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed
22.8 KB
Loading
23.1 KB
Loading

torchaudio/transforms.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,9 @@ def forward(self, specgram: Tensor, mask_value: float = 0.) -> Tensor:
821821
class FrequencyMasking(_AxisMasking):
822822
r"""Apply masking to a spectrogram in the frequency domain.
823823
824+
In the image below, a frequency band has been masked on a spectrogram.
825+
.. image:: _static/img/specaugment-freq.jpg
826+
824827
Args:
825828
freq_mask_param (int): maximum possible length of the mask.
826829
Indices uniformly sampled from [0, freq_mask_param).
@@ -835,6 +838,9 @@ def __init__(self, freq_mask_param: int, iid_masks: bool = False) -> None:
835838
class TimeMasking(_AxisMasking):
836839
r"""Apply masking to a spectrogram in the time domain.
837840
841+
In the image below, a time band has been masked on a spectrogram.
842+
.. image:: _static/img/specaugment-time.jpg
843+
838844
Args:
839845
time_mask_param (int): maximum possible length of the mask.
840846
Indices uniformly sampled from [0, time_mask_param).

0 commit comments

Comments
 (0)