Skip to content

Initializer appears in graph inputs and will not be treated as constant value/weight. #4033

@zr526799544

Description

@zr526799544

Describe the bug
I use pytorch 1.3 onnx 1.6 to export an onnx model with onnx optimizer to optimize passes = ["extract_constant_to_initializer", "eliminate_unused_initializer"]. and run it on onnxruntime 1.1.2 python 3.6.9 with no warnning.but got bunch of warning in c++ with onnxruntime 1.1.2
just like:
Initializer backbone.bn1.bias appears in graph inputs and will not be treated as constant value/weight. This may fail some of the graph optimizations, like const folding. Move it out of graph inputs if there is no need to override it, by either re-generating the model with latest exporter/converter or with the tool onnxruntime/tools/python/remove_initializer_from_input.py.

Initializer 997 appears in graph inputs and will not be treated as constant value/weight. This may fail some of the graph optimizations, like const folding. Move it out of graph inputs if there is no need to override it, by either re-generating the model with latest exporter/converter or with the tool onnxruntime/tools/python

System information

  • Linux Ubuntu 16.04:
  • ONNX Runtime installed from source:
  • ONNX Runtime version:1.1.2 cpu

To Reproduce

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screensho
onnx1
onnx2

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