filtering
filtering copied to clipboard
Fix type problem for GPU tensors
Fix type problem for GPU tensors
This fix is not great because it requires transferring the data to GPU each time it's used. That is slow. Better have the device an arg to the constructor, I think.
On Fri, Jan 10, 2020 at 6:00 AM Zili Huang [email protected] wrote:
Fix type problem for GPU tensors
You can view, comment on, or merge this pull request online at:
https://github.com/danpovey/filtering/pull/3 Commit Summary
- fix type problem for GPU tensors
File Changes
- M lilfilter/local_amplitude.py https://github.com/danpovey/filtering/pull/3/files#diff-0 (4)
- M lilfilter/resampler.py https://github.com/danpovey/filtering/pull/3/files#diff-1 (6)
- M lilfilter/torch_filter.py https://github.com/danpovey/filtering/pull/3/files#diff-2 (2)
Patch Links:
- https://github.com/danpovey/filtering/pull/3.patch
- https://github.com/danpovey/filtering/pull/3.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/danpovey/filtering/pull/3?email_source=notifications&email_token=AAZFLOY5NOZJ3NUR4L3HADLQ46M6HA5CNFSM4KE7CZCKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IFF62LQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZFLO4ROW4J7WRPH453MULQ46M6HANCNFSM4KE7CZCA .
I have a project where I need gpu functionality, so I'll go ahead and merge it into my own fork. Thanks @HuangZiliAndy :)
I think it would make more sense (would be more efficient) to add a device class member and optional constructor arg.
.type_as() only changes the dtype, not the device, anyway, so it seems it wouldn't solve the stated problem.
i can go ahead and implement that, unless you want to do it :) i'll be slower to write it than you for sure
yes, please do!
On Fri, Jun 18, 2021 at 3:15 PM Kento Nishi @.***> wrote:
i can go ahead and implement that, unless you want to do it :) i'll be slower to write it than you for sure
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danpovey/filtering/pull/3#issuecomment-863815626, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZFLOYRENTXVNSPXLQNYSDTTLXATANCNFSM4KE7CZCA .
hm, i just found out that torchaudio.transforms.Resample exists. i'll give that a try instead :P