Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

IndexError: list index out of range #137

Closed
SirNader opened this issue Feb 4, 2023 · 2 comments
Closed

IndexError: list index out of range #137

SirNader opened this issue Feb 4, 2023 · 2 comments
Labels
onnx2tf onnx2tf

Comments

@SirNader
Copy link

SirNader commented Feb 4, 2023

Issue Type

Bug

OS

Ubuntu

OS architecture

x86_64

Programming Language

Python

Framework

OpenVINO, TensorFlow, TensorFlowLite

Download URL for ONNX / OpenVINO IR

https://drive.google.com/file/d/1fr7p1p7gqnBFw9ykeRmqgfZpaitSdBMx/view?usp=share_link

Convert Script

openvino2tensorflow --model_path openvino/ABINet.simplified.xml --output_saved_model --output_pb --output_weight_quant_tflite --output_float16_quant_tflite --output_no_quant_float32_tflite

Description

I was trying to convert an OpenVINO model to Tensorflow and TFLite and I ended up with this error, I'd be grateful if you manage to help me out with this.
Thank you!

Relevant Log Output

2023-02-04 18:28:43.571885: I tensorflow/core/util/util.cc:169] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
TensorFlow/Keras model building process starts ======================================
Layer structure =====================================================================
Traceback (most recent call last):
  File "/home/nader/miniconda3/envs/tf/bin/openvino2tensorflow", line 7887, in <module>
    main()
  File "/home/nader/miniconda3/envs/tf/bin/openvino2tensorflow", line 7871, in main
    convert(model, model_output_path, output_saved_model, output_h5, output_weight_and_json, output_pb, dont_convert_from_keras_model,
  File "/home/nader/miniconda3/envs/tf/bin/openvino2tensorflow", line 592, in convert
    temp_sorted_tf_edge.append(tf_edges[to_layer][ports.index(str(idx))])
IndexError: list index out of range

Source code for simple inference testing code

No response

@PINTO0309 PINTO0309 added the onnx2tf onnx2tf label Feb 5, 2023
@PINTO0309
Copy link
Owner

PINTO0309 commented Feb 5, 2023

Please share ONNX files. Also, please share the URL of the repository from which you got the quote. Engineers around the world would be pleased if you would also share the code you used to convert from PyTorch to ONNX.

I recommend the use of the latest tool here. No conversion errors occur and no accuracy errors are introduced. It also supports complex models such as Transformer. openvino2tensorflow is not actively maintained at this time.
https://github.com/PINTO0309/onnx2tf

#136

@PINTO0309 PINTO0309 pinned this issue Feb 5, 2023
@SirNader
Copy link
Author

SirNader commented Feb 5, 2023

Please share ONNX files. Also, please share the URL of the repository from which you got the quote. Engineers around the world would be pleased if you would also share the code you used to convert from PyTorch to ONNX.

I recommend the use of the latest tool here. No conversion errors occur and no accuracy errors are introduced. It also supports complex models such as Transformer. openvino2tensorflow is not actively maintained at this time. https://github.com/PINTO0309/onnx2tf

#136

Thank you for your reply, I will use onnx2tf and see if I can get this to work.

@SirNader SirNader closed this as completed Feb 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
onnx2tf onnx2tf
Projects
None yet
Development

No branches or pull requests

2 participants