Skip to content

Conversation

@DrRyanHuang
Copy link
Contributor

PR Category

Execute Infrastructure

PR Types

Bug fixes

Description

目前运行包含 Deformable Conv2d 的模型,如: ttfnet^pafnet_10x_coco_单卡动转静训练ppyolo^ppyolov2_r101vd_dcn_365e_coco_单卡动转静训练,会出现如下问题:

  File "/workspace/Paddle/build/python/paddle/vision/ops.py", line 907, in deform_conv2d
    pre_bias = _C_ops.deformable_conv(

ValueError: (InvalidArgument) The number of input channels should be equal to filter channels * groups. The difference is [256]: [-1]
  [Hint: Expected in_dims[1] == filter_dims[1] * groups, but received in_dims[1]:256 != filter_dims[1] * groups:-1.] (at /workspace/Paddle/paddle/phi/infermeta/multiary.cc:1859)

如下代码的 in_dims[1]filter_dims[1] 都会存在 -1 的情况:

PADDLE_ENFORCE_EQ(
in_dims[1],
filter_dims[1] * groups,
common::errors::InvalidArgument(
"The number of input channels should be equal to filter "
"channels * groups. The difference is [%d]: [%d]",
in_dims[1],
filter_dims[1] * groups));

所以在编译期且存在 -1 的情况直接跳过参数检查

pcard-91591

@DrRyanHuang DrRyanHuang requested a review from SigureMo August 16, 2025 06:32
@paddle-bot
Copy link

paddle-bot bot commented Aug 16, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@409515d). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             develop    #74650   +/-   ##
===========================================
  Coverage           ?   100.00%           
===========================================
  Files              ?         1           
  Lines              ?         5           
  Branches           ?         0           
===========================================
  Hits               ?         5           
  Misses             ?         0           
  Partials           ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DrRyanHuang DrRyanHuang requested a review from SigureMo August 18, 2025 07:33
@SigureMo SigureMo merged commit 6ea5eec into PaddlePaddle:develop Aug 18, 2025
112 of 115 checks passed
@SigureMo SigureMo deleted the fix_deformable_conv branch August 18, 2025 07:36
Luckycheng222 pushed a commit to Luckycheng222/Paddle that referenced this pull request Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants