openvinotoolkit / openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
https://docs.openvino.ai
Apache License 2.0
7k stars 2.21k forks source link

How to convert model from Onnx with Multinomial #19344

Open dimitryn opened 1 year ago

dimitryn commented 1 year ago

OpenVINO Version => Version 2023.0.1 Operating System / Platform => Ubuntu 22.04

Hi , I have model witch I converted from PyTorch to Onnx and now trying to convert to Openvino . I am getting error (openvino_env) administrator@xxxx:~$ mo --input_model /home/administrator/Code/model.onnx [ ERROR ] ------------------------------------------------- [ ERROR ] ----------------- INTERNAL ERROR ---------------- [ ERROR ] Unexpected exception happened. [ ERROR ] Please contact Model Optimizer developers and forward the following information: [ ERROR ] Check 'unknown_operators.empty()' failed at src/frontends/onnx/frontend/src/core/graph.cpp:226: OpenVINO does not support the following ONNX operations: Multinomial

[ ERROR ] Traceback (most recent call last): File "/home/administrator/Downloads/openvino_env/lib/python3.10/site-packages/openvino/tools/mo/convert_impl.py", line 915, in _convert ov_model, legacy_path = driver(argv, {"conversion_parameters": non_default_params}) File "/home/administrator/Downloads/openvino_env/lib/python3.10/site-packages/openvino/tools/mo/convert_impl.py", line 591, in driver graph, ngraph_function = prepare_ir(argv) File "/home/administrator/Downloads/openvino_env/lib/python3.10/site-packages/openvino/tools/mo/convert_impl.py", line 404, in prepare_ir ngraph_function = moc_pipeline(argv, moc_front_end) File "/home/administrator/Downloads/openvino_env/lib/python3.10/site-packages/openvino/tools/mo/moc_frontend/pipeline.py", line 266, in moc_pipeline ov_model = moc_front_end.convert(input_model) RuntimeError: Check 'unknown_operators.empty()' failed at src/frontends/onnx/frontend/src/core/graph.cpp:226: OpenVINO does not support the following ONNX operations: Multinomial

[ ERROR ] ---------------- END OF BUG REPORT -------------- [ ERROR ] -------------------------------------------------

Is there way to replace Multinomial with other operations to bypass this error ? Thanks

mlukasze commented 1 year ago

hey @dimitryn

Thank you for letting us know. We are in a next release planning phase and multinomial is on of candidates. I will back to you with information about plan to support for this operator in next week.

andrei-kochin commented 8 months ago

Supposed to be implemented is the scope of #21789

andrei-kochin commented 4 months ago

@dimitryn #21789 is merged Please check on the latest master