Skip to content

使用paddle2onnx导出的segformer onnx,报Integer division by zero #3946

Description

@FreemanTang

问题确认 Search before asking

Bug描述 Describe the Bug

@wuyefeilin @juncaipeng 大佬们,请教一下,我使用paddle2onnx导出的segformer onnx模型,在使用onnxruntime推理时报Integer division by zero,是什么原因导致的,有解决方法吗?

paddle2onnx --model_dir inference_model ^
            --model_filename model.pdmodel ^
            --params_filename model.pdiparams ^
            --save_file model.onnx

最奇怪的点是,一样是segformer导出的onnx模型,只是训练时input_shape不一样,但是input_shape:[1,3,384,192]的可以正常推理,但是input_shape:[1,3,384,96]的就报错了(Integer division by zero),并且我调试发现是session初始化时就报错了。

Image Image

复现环境 Environment

  • OS: Windows -
  • PaddlePaddle: 2.4.2
  • PaddleSeg: release/2.8
  • paddle2onnx:1.3.0
  • Python: 3.10.0

Bug描述确认 Bug description confirmation

  • 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • 我愿意提交PR!I'd like to help by submitting a PR!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions