asteroid-team / torch-audiomentations

Fast audio data augmentation in PyTorch. Inspired by audiomentations. Useful for deep learning.
MIT License
969 stars 88 forks source link

RandomCrop does not work on GPU #153

Closed miccio-dk closed 2 years ago

miccio-dk commented 2 years ago

Hi everyone, thanks for the really cool library. The RandomCrop augmentation forces my data to be on the CPU. After looking into the code (and some of the similar issues here), it seems that the samples_cropped variable needs to have its device specified. I will submit a pull request soon with the change, let me know if I should write a test for it (not very familiar with testing but I can try).

iver56 commented 2 years ago

RandomCrop wasn't officially released yet due to its state. Thanks for helping it become ready for release :)