- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to run one of the 3 speech recognition demos:
tep 34/37 : RUN omz_converter -d /home/cnb/public --name quartznet-15x5-en -o /home/cnb
---> Running in c5b2db369056
========== Converting quartznet-15x5-en to ONNX
Conversion to ONNX command: /usr/bin/python3 -- /usr/local/lib/python3.7/dist-packages/openvino/model_zoo/internal_scripts/pytorch_to_onnx.py --model-path=/usr/local/lib/python3.7/dist-packages/openvino/model_zoo/models/public/quartznet-15x5-en --model-path=/home/cnb/public/public/quartznet-15x5-en/models --model-name=QuartzNet --import-module=model --input-shape=1,64,128 --output-file=/home/cnb/public/quartznet-15x5-en/quartznet.onnx '--model-param=model_config=r"/home/cnb/public/public/quartznet-15x5-en/models/.nemo_tmp/module.yaml"' '--model-param=encoder_weights=r"/home/cnb/public/public/quartznet-15x5-en/models/.nemo_tmp/JasperEncoder.pt"' '--model-param=decoder_weights=r"/home/cnb/public/public/quartznet-15x5-en/models/.nemo_tmp/JasperDecoderForCTC.pt"' --input-names=audio_signal --output-names=output '--conversion-param=dynamic_axes={"audio_signal": {0: "batch_size, 2: "wave_len"}, {"output: {0: "batch_size", 2: "wave_len"}}'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/openvino/model_zoo/internal_scripts/pytorch_to_onnx.py", line 187, in <module>
main()
File "/usr/local/lib/python3.7/dist-packages/openvino/model_zoo/internal_scripts/pytorch_to_onnx.py", line 178, in main
args = parse_args()
File "/usr/local/lib/python3.7/dist-packages/openvino/model_zoo/internal_scripts/pytorch_to_onnx.py", line 120, in parse_args
return parser.parse_args()
File "/usr/lib/python3.7/argparse.py", line 1764, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/lib/python3.7/argparse.py", line 1796, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/lib/python3.7/argparse.py", line 2002, in _parse_known_args
start_index = consume_optional(start_index)
File "/usr/lib/python3.7/argparse.py", line 1942, in consume_optional
take_action(action, args, option_string)
File "/usr/lib/python3.7/argparse.py", line 1854, in take_action
argument_values = self._get_values(action, argument_strings)
File "/usr/lib/python3.7/argparse.py", line 2384, in _get_values
value = self._get_value(action, arg_string)
File "/usr/lib/python3.7/argparse.py", line 2417, in _get_value
result = type_func(arg_string)
File "/usr/local/lib/python3.7/dist-packages/openvino/model_zoo/internal_scripts/pytorch_to_onnx.py", line 82, in model_parameter
value = eval(value, {}, {})
File "<string>", line 1
{"audio_signal": {0: "batch_size, 2: "wave_len"}, {"output: {0: "batch_size", 2: "wave_len"}}
^
SyntaxError: invalid syntax
FAILED:
quartznet-15x5-en
The error seems to be an error in the omz_converter utility?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The same here, did you solve the error?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
There seems to be a syntax error on the last line.
You can fix it by running the following command:
/usr/bin/python3 -- /usr/local/lib/python3.7/dist-packages/openvino/model_zoo/internal_scripts/pytorch_to_onnx.py --model-path=/usr/local/lib/python3.7/dist-packages/openvino/model_zoo/models/public/quartznet-15x5-en --model-path=/home/cnb/public/public/quartznet-15x5-en/models --model-name=QuartzNet --import-module=model --input-shape=1,64,128 --output-file=/home/cnb/public/quartznet-15x5-en/quartznet.onnx '--model-param=model_config=r"/home/cnb/public/public/quartznet-15x5-en/models/.nemo_tmp/module.yaml"' '--model-param=encoder_weights=r"/home/cnb/public/public/quartznet-15x5-en/models/.nemo_tmp/JasperEncoder.pt"' '--model-param=decoder_weights=r"/home/cnb/public/public/quartznet-15x5-en/models/.nemo_tmp/JasperDecoderForCTC.pt"' --input-names=audio_signal --output-names=output '--conversion-param=dynamic_axes={"audio_signal": {0: "batch_size", 2: "wave_len"}, "output": {0: "batch_size", 2: "wave_len"}}'
In this way, the PyTorch model will be converted to the ONNX format.
Then, you can proceed with the conversion to OpenVINO IR using the Model Optimizer.
I hope this can help.
Greetings,
Vincenzo

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page