Skip to content

Error merging shape info for output #23185

@FFchopon

Description

@FFchopon

Bug Report


Error merging shape info for output.

Error message

[W:onnxruntime:, graph.cc:109 MergeShapeInfo] Error merging shape info for output. 'onnx::Add_15' source:{5,50,1} target:{1,5,50,1}. Falling back to lenient merge.

To reproduce

  1. Download model here
  2. Run the test script
import onnxruntime as rt

sess_options = rt.SessionOptions()

# Set graph optimization level
sess_options.graph_optimization_level = rt.GraphOptimizationLevel.ORT_ENABLE_EXTENDED

# To enable model serialization after graph optimization set this
sess_options.optimized_model_filepath = "opt_model.onnx"

session = rt.InferenceSession("model.onnx", sess_options)

Notice:

  1. sess_options.graph_optimization_level = rt.GraphOptimizationLevel.ORT_ENABLE_EXTENDED

    → error

  2. sess_options.graph_optimization_level = rt.GraphOptimizationLevel.ORT_ENABLE_BASIC

    →run well

Urgency

no response

Platform

Linux

OS Version

Ubuntu 12.04

ONNX Runtime Installation

Built from Source

ONNX Runtime APl

Python

Execution Provider

CUDA

Metadata

Metadata

Assignees

No one assigned

    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