Application of FrequencyMasking/TimeMasking to batch of data in pytorch
I have a torch-Tensor of shape [k, l, m]
, with k
being the batch size, and [l, m]
forming a spectrogram. Now, I would like to apply both a time-mask and a frequency-mask on each spectrogram. Currently, I have to loop over all entries with the following snippet of code: