-
Notifications
You must be signed in to change notification settings - Fork 89
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
RuntimeError: Exporting the operator col2im to ONNX opset version 12 is not supported #102
Comments
At first glance, it seems this error is related to PyTorch version, rather than nnAudio. Which PyTorch version are you using? |
I ran a quick test on my computer with the following code, and I can obtain the onnx file successfully. from nnAudio.Spectrogram import STFT
import torch
dummy_input = torch.randn(4,44100)
stft_layer = STFT()
torch.onnx.export(stft_layer,
dummy_input,
'stft_layer.onnx',
verbose=True,
input_names=['waveforms'],
output_names=['stft_output']) I am using pytorch==1.9.0+cu111 and nnAudio==0.2.5. Could you double check if you are able to do ONNX using the same pytorch and nnAudio as me? |
hi, i test it again and this problem might locate in the iSTFT module, here is the test code.
|
You are right, when trying to export
This is because the nnAudio/Installation/nnAudio/utils.py Lines 19 to 29 in ac9cd13
There is a open issue under the PyTorch repo, I think people are working on it already. Unfortunately, there is not much I can do at the moment. One workaround is to implement the two functions, |
Operator col2im is supported for opset version 18 but not the previous ones, is they a way to overcome the error? |
hi, i convert the stft model to onnx version , but a error is raised.
'''
RuntimeError: Exporting the operator col2im to ONNX opset version 12 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub
'''
The text was updated successfully, but these errors were encountered: