fastaudio / fastai_audio

[DEPRECATED] 🔊️ Audio with fastaiv1
MIT License
160 stars 49 forks source link

Changes to installation requirements and prediction functions #58

Closed babat00nday closed 4 years ago

babat00nday commented 4 years ago

1 Changes to installation requirements

To get fastai audio working, I needed to specify older PyTorch versions, as I was getting this error with the most recent PyTorch version (the other version changes to torchvision and torchaudio were needed to support the 1.4.0 version).

databunch to float RuntimeError: Expected object of scalar type Float but got scalar type Double for argument #3 'mat2' in call to _th_addmm_out

2 Changes to learner.py

I noticed audio_predict and audio_predict_all functions were failing when I tried to follow a tutorial. I noticed recent changes modified the expected behavior of AudioList class and functions which were directly or indirectly called while executing these functions (audio_predict and audio_predict_all).

I modified the arguments to AudioList constructor and the AudioList.open function to make it work. Some sort of unit test may help catch some of these minor errors.

mogwai commented 4 years ago

There has been a lot of complaints about the predict method of recent so I'm going to take a look at this in depth and see what we can do to make people's lives easier in that regard.

For future reference it is better to break up several changes into multiple PR's in case one of them is rejected.

Thanks for your contribution though

mogwai commented 4 years ago

Can you share the code that your using that isn't working?

babat00nday commented 4 years ago

@mogwai Tested my code sample again, forcing build to previous PyTorch is no longer necessary. If you have plans to take a look into the predict method and possibly refactor it, you can discard this PR.