SpecAugment
SpecAugment copied to clipboard
How to Perform Spec Augmentation on Batch Size > 1?
For example, I have a tensor with a batch size of 2, e.g. of shape torch.Size([2, 256, 512])
.
Now, when I run the command through
spec_augment_pytorch.spec_augment(mel_spectrogram=mel_spectrogram)
I have the error
RuntimeError: shape '[2, 256, 512, 2]' is invalid for input of size 262144
I don't think the source code accomodates batches, despite the input dimensions.
https://github.com/IMLHF/SpecAugmentPyTorch, this support batch and channel, and fix time wrap bugs by using torch functions