New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AudioSpectrogram failed to be plotted under ClassificationInterpretation #95
Comments
I never tried to run InterpretationClassification on audio models, so it's not surprising that it's broken. Why did you have to |
@scart97
|
Didn't find the root cause yet, but I could isolate the problem better. The issue is not related to ClassificationInterpretation directly, the input tensor doesn't have the correct I guess the problem needs to be fixed on fastai, but I don't have enough knowledge about the dataloaders stuff yet to properly understand what is happening here. |
@scart97 |
After digging into this with Arto from fastai discord today, Arto submitted a PR that will fix TensorBase with his PR: fastai/fastai#3383 I believe we can do something similar as a temporary fix, but once we go to pytorch 1.8.1, we should be able to rely on Tensor.__reduce_ex__ directly since the new version handles the object.__dict__ properly (which ends up being the issue in pytorch 1.7.1 and fastai (for slightly different reasons). Should I create a temporary work around similar to what Arto did in fastai to fix it with our current version of fastaudio that uses fastai 2.2.7 or do we want to increase the version requirement to pytorch 1.8.1 instead (which would also fix the issue). |
Have tried out the fix. It could fix the issue I raised here (i.e. |
so adding that code back here, we would need to add this somewhere:
Then we should be able to keep the same 2.2.7 requirement and stick with all the same dependencies right? Where would these chunks of code be added in fastaudio? maybe instead of patching TensorBase, this |
The fix needs to be applied at the |
🎉 This issue has been resolved in version 0.1.6 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
I have made a public kaggle kernel for reproducing the bug as your reference (look at session
3. Failed to Show AudioSpectrogram
for the main point):https://www.kaggle.com/alexlwh/failed-to-show-audiospec-tensor
Essentially, I tried to show the predictions v.s. ground truth using ClassificationInterpretation as follows:
And then I got the following error:
I suspect it is because at some point the
AudioSpectrogram.sr
failed to be propagated toClassificationInterpretation
, renderinginterp.inputs.sr = None
. (Not sure exactly at which point the issue happens yet):The text was updated successfully, but these errors were encountered: