Skip to content

error while creating onnx_node #2354

Open
@KTibow

Description

@KTibow

Describe the bug
This error while converting a model:

2024-08-24 23:42:22,711 - INFO - Using tensorflow=2.17.0, onnx=1.16.2, tf2onnx=1.16.1/f85e88
2024-08-24 23:42:22,711 - INFO - Using opset <onnx, 17>
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.10/dist-packages/tf2onnx/convert.py", line 714, in <module>
    main()
  File "/usr/local/lib/python3.10/dist-packages/tf2onnx/convert.py", line 273, in main
    model_proto, _ = _convert_common(
  File "/usr/local/lib/python3.10/dist-packages/tf2onnx/convert.py", line 168, in _convert_common
    g = process_tf_graph(tf_graph, const_node_values=const_node_values,
  File "/usr/local/lib/python3.10/dist-packages/tf2onnx/tfonnx.py", line 453, in process_tf_graph
    main_g, subgraphs = graphs_from_tflite(tflite_path, input_names, output_names)
  File "/usr/local/lib/python3.10/dist-packages/tf2onnx/tflite_utils.py", line 153, in graphs_from_tflite
    parse_tflite_graph(tfl_graph, opcodes, model, prefix, tensor_shapes_from_interpreter)
  File "/usr/local/lib/python3.10/dist-packages/tf2onnx/tflite_utils.py", line 485, in parse_tflite_graph
    onnx_node = utils.make_onnx_node_with_attr(optype, input_names, output_names, name=output_names[0], **attr)
IndexError: list index out of range

Urgency

I have personal projects that would benefit from this working, not that it matters though

System information

  • OS Platform and Distribution: Colab Runtime (Ubuntu 22.04)
  • TensorFlow Version: 2.17.0
  • Python version: 3.10.12
  • ONNX version (if applicable, e.g. 1.11*): 1.16.2
  • ONNXRuntime version (if applicable, e.g. 1.11*): None
  • tensorflow-onnx version: Both on main and on 5f209d6

To Reproduce

Model (inside a zip): vad.zip
Command: python -m tf2onnx.convert --tflite ./vad.tflite --output ./vad.onnx --opset 17

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions