Comments (6)
Other update: this issue is currently tracked on pytorch repo: pytorch/pytorch#75383
from nisqa.
Update: when trying to export the model from Linux (or WSL in my case), I get the following, more verbose errors:
Device: cpu
Model architecture: NISQA_DIM
Loaded pretrained model from weights/nisqa.tar
/home/username/miniconda3/envs/nisqa/lib/python3.9/site-packages/torch/onnx/utils.py:1294: UserWarning: Provided key output for dynamic axes is not a valid input/output name
warnings.warn("Provided key {} for dynamic axes is not a valid input/output name".format(key))
WARNING: The shape inference of prim::PackPadded type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of prim::PackPadded type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
/home/username/miniconda3/envs/nisqa/lib/python3.9/site-packages/torch/onnx/symbolic_helper.py:258: UserWarning: ONNX export failed on adaptive_max_pool2d because input size not accessible not supported
warnings.warn("ONNX export failed on " + op + " because " + msg + " not supported")
/home/username/miniconda3/envs/nisqa/lib/python3.9/site-packages/torch/onnx/symbolic_helper.py:716: UserWarning: allowzero=0 by default. In order to honor zero value in shape use allowzero=1
warnings.warn("allowzero=0 by default. In order to honor zero value in shape use allowzero=1")
WARNING: The shape inference of prim::PadPacked type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of prim::PadPacked type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
Segmentation fault
PS: you can access my script here: https://github.com/miccio-dk/NISQA
Notice that run_export.py
behaves exactly like run_predict.py
except I'm forcing CPU.
from nisqa.
Thanks, hopefully, someone will be able to help in the PyTorch repo. I haven't converted this particular model to ONNX before but a workaround you could try is to remove the packed sequence parts altogether if this is causing the errors. Actually, that's what I used to do with other models because ONNX didn't use to support packed sequences then.
from nisqa.
Closing this as it is not directly related to the model but rather to PyTorch. BTW - if you want to export it to ONNX you probably need to use the model without adaptive pooling layers and without packed sequences. Then it should work
from nisqa.
@gabrielmittag do I need to retrain the model after removing packed sequences or there are some kind of workaround here? Stuck on similar problem, only packed sequences are the issue for me
from nisqa.
Update: when trying to export the model from Linux (or WSL in my case), I get the following, more verbose errors:
Device: cpu Model architecture: NISQA_DIM Loaded pretrained model from weights/nisqa.tar /home/username/miniconda3/envs/nisqa/lib/python3.9/site-packages/torch/onnx/utils.py:1294: UserWarning: Provided key output for dynamic axes is not a valid input/output name warnings.warn("Provided key {} for dynamic axes is not a valid input/output name".format(key)) WARNING: The shape inference of prim::PackPadded type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function. WARNING: The shape inference of prim::PackPadded type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function. /home/username/miniconda3/envs/nisqa/lib/python3.9/site-packages/torch/onnx/symbolic_helper.py:258: UserWarning: ONNX export failed on adaptive_max_pool2d because input size not accessible not supported warnings.warn("ONNX export failed on " + op + " because " + msg + " not supported") /home/username/miniconda3/envs/nisqa/lib/python3.9/site-packages/torch/onnx/symbolic_helper.py:716: UserWarning: allowzero=0 by default. In order to honor zero value in shape use allowzero=1 warnings.warn("allowzero=0 by default. In order to honor zero value in shape use allowzero=1") WARNING: The shape inference of prim::PadPacked type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function. WARNING: The shape inference of prim::PadPacked type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function. Segmentation fault
PS: you can access my script here: https://github.com/miccio-dk/NISQA Notice that
run_export.py
behaves exactly likerun_predict.py
except I'm forcing CPU.
I wondor if you have solve this problem. Same Problem I met.
from nisqa.
Related Issues (20)
- Is it possible to use the model as a function? HOT 1
- Can this model be modified into a speech quality classification model? HOT 1
- RuntimeError: Could not infer dtype of numpy.float32 HOT 10
- Using NISQA as a loss function HOT 2
- NISQA Corpus download issue HOT 1
- Continuous metrics? HOT 4
- TTS naturalness prediction based on which model
- Could you tell me if the MOS rating is objective or subjective? HOT 4
- Full Reference or No Reference When Subjectively Rating a Speech HOT 1
- upper bound and larger bound inconsistent with step sign HOT 1
- Audio input requirements HOT 2
- pip package HOT 4
- CDUA device does not load the model HOT 2
- Interpertation of Different metrics HOT 1
- The predict result seems not reliable HOT 3
- License
- upper bound and larger bound inconsistent with step sign
- It seams slowly because of some functions running on CPU
- max window length error for most audio files HOT 1
- Utilizing finetuned weights
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nisqa.