Correctness unit test would be great
keunwoochoi opened this issue · 2 comments
keunwoochoi commented
For some transforms, we can test if the values are actually correct by manually computing the expected value. For example, PolarityInversion
could be test with some tiny tensors like [[0.1, 0.5, -1.0]]. Reverse
as well. Probably only those two? Still, it'd be better than not having any.
Spijkervet commented
I currently test the PolarityInversion in: https://github.com/Spijkervet/torchaudio-augmentations/blob/master/tests/test_augmentations.py#L43
I agree I should have tested it with an explicitly defined vector rather than relying on torch.neg() here. Same applies for Reverse(). I'll add these!
Spijkervet commented
Addressed in b2065b8 :D
(For mono, stereo and batched audio)