Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PaddleV3] 修复 onnx 中不兼容的自定义层与写法并修复相关模型 #1082

Merged
merged 17 commits into from
Nov 1, 2024

Conversation

megemini
Copy link
Contributor

Create A Good Pull Request

修复 onnx 中不兼容的自定义层与写法并修复相关模型

其中,修改自定义层,兼容最新版本的 Paddle:

  • x2paddle/op_mapper/onnx2paddle/onnx_custom_layer/roi_align.py,兼容最新 Paddle 算子
  • x2paddle/op_mapper/onnx2paddle/onnx_custom_layer/nms.py,兼容最新 Paddle 算子
  • x2paddle/op_mapper/onnx2paddle/onnx_custom_layer/one_hot.py,兼容最新 Paddle 类型提升写法

修改不兼容写法:

  • x2paddle/decoder/onnx_shape_inference.py

    • onnx 最新版本,未知的 dim 返回 unk_X 而不是 None
    • numpy 最新版本已经废弃 asscalar 函数

修改相关模型:

  • test_benchmark/ONNX/SwinTransformer
  • test_benchmark/ONNX/bert6
  • test_benchmark/ONNX/mmdetection_fasterrcnn
  • test_benchmark/ONNX/mmdetection_fcos
  • test_benchmark/ONNX/mmdetection_fsaf
  • test_benchmark/ONNX/mmdetection_retina
  • test_benchmark/ONNX/mmdetection_ssd
  • test_benchmark/ONNX/mmdetection_yolov3
  • test_benchmark/ONNX/mobilefacenet
  • test_benchmark/ONNX/yolov5s

今天有点发烧,等好一点了,我把最新的进展再更新一下哈 ~ 🙏🙏🙏

@luotao1

@megemini
Copy link
Contributor Author

Update 20241025

修改 paddle.flatten 的输入参数名称,关联 #1062

@luotao1 luotao1 added the contributor External developers label Oct 31, 2024
@megemini
Copy link
Contributor Author

megemini commented Nov 1, 2024

Update 20241101

CI 已通过 ~ 目前 ONNX 的 black.list 已经清空了 ~

@luotao1

@luotao1 luotao1 merged commit 00bdc41 into PaddlePaddle:develop Nov 1, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants