Skip to content

converter only supports while loops with a single scan output #1229

@wangqiaoshi

Description

@wangqiaoshi

Describe the bug
A clear and concise description of what the bug is.

Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/site-packages/tf2onnx/tfonnx.py", line 289, in tensorflow_onnx_mapping
    func(g, node, **kwargs, initialized_tables=initialized_tables)
  File "/opt/conda/lib/python3.8/site-packages/tf2onnx/onnx_opset/controlflow.py", line 444, in version_7
    utils.make_sure(len(removed_scan_outputs) <= 1, "converter only supports while loops with a single scan output")
  File "/opt/conda/lib/python3.8/site-packages/tf2onnx/utils.py", line 218, in make_sure
    raise ValueError("make_sure failure: " + error_msg % args)
ValueError: make_sure failure: converter only supports while loops with a single scan output

Urgency
If there are particular important use cases blocked by this or strict project-related timelines, please share more information and dates. If there are no hard deadlines, please specify none.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): 18.04
  • Tensorflow Version: 2.3.1
  • Python version: 3.8

To Reproduce
Describe steps/code to reproduce the behavior:

wget https://s3.amazonaws.com/opennmt-models/averaged-ende-export500k-v2.tar.gz
tar xf averaged-ende-export500k-v2.tar.gz
python -m tf2onnx.convert --saved-model averaged-ende-export500k-v2 --extra_opset ai.onnx.contrib:1 --opset 10 --output model.onnx

Expected behavior

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here. If the issue is about a particular model, please share the model details as well to facilitate debugging.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions