Closed lminer closed 2 years ago
Thanks for the issue @lminer
I don't think it's for backward compatibility reasons that we keep this, but to be able to export filterbanks using torch.trace
.
Do the tests run if you remove the decorator ?
I haven't been able to run the tests, but I have been able to run torch.jit.trace
without an issue.
So, the tests are failing without it. We want the encoder to work in the same way for all input dimensions, that's why we use script_if_tracing
.
What do you suggest doing ?
I think I’m not entirely clear what ‘script_if_tracing’ does and how it helps with shapes. What if we put a flag in the encoder constructor that defaults to true, but that can be disabled?
On Fri, Jul 29, 2022 at 9:02 PM Pariente Manuel @.***> wrote:
So, the tests are failing without it. We want the encoder to work in the same way for all input dimensions, that's why we use script_if_tracing.
What do you suggest doing ?
— Reply to this email directly, view it on GitHub https://github.com/asteroid-team/asteroid-filterbanks/issues/15#issuecomment-1199860593, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHDTFIQBP5O42HOP7DZSTDVWQTFZANCNFSM55ATKLFQ . You are receiving this because you were mentioned.Message ID: @.***>
It appears that the
onnxruntime
does not like thescript_if_tracing
decorator introduced for backwards compatibility. If you remove the decorator from here, everything works fine. However, with the decorator included, we get a reshape error.If the decorator is only needed for torch 1.6.0 support, maybe it should only be used for that version of torch?
Here's a reproducible example that you can run on colab:
Produces: