asteroid-team / asteroid-filterbanks

Asteroid's filterbanks :rocket:
https://asteroid-team.github.io/
MIT License
80 stars 20 forks source link

Fix Decoder forward(..., length) #8

Closed faroit closed 3 years ago

faroit commented 3 years ago

Addresses #7

faroit commented 3 years ago

@mpariente torch.stft doesn't support 3D, asteroid doesn't support 2D inputs, any idea for a less hacky unit test?

mpariente commented 3 years ago

Did torch.stft always behave like this?

mpariente commented 3 years ago

Actually, we want to behave like nn.Conv1d, not like torch.stft, so it doesn't matter that the shapes are not the same.

faroit commented 3 years ago

Actually, we want to behave like nn.Conv1d, not like torch.stft, so it doesn't matter that the shapes are not the same.

maybe then we add the channel-> batch wrapping for the unit tests of torch.stft so that they give the same output?

faroit commented 3 years ago

@mpariente maybe you are quicker to carry out the unit-test changes? In that case I can just revert 18068e2 so that we just merge the fix followed by unit test changes by you later

mpariente commented 3 years ago

I'd rather have the unit test before merging and sorry but I don't have time for it now.

faroit commented 3 years ago

related: @jonashaag do you know of any news regarding nd-support for torch.stft and torch.istft?

I think you were reporting this first on https://github.com/pytorch/pytorch/issues/42813

faroit commented 3 years ago

@mpariente ready for review

jonashaag commented 3 years ago

@faroit haven't read this issue and I'm not following the PyTorch one. Feel free to follow up there with whatever you think is appropriate. I can't reopen that ticket

faroit commented 3 years ago

@mpariente 👍 would you be able to push a new release soon?