Skip to content

Conversation

@SigureMo
Copy link
Member

@SigureMo SigureMo commented Oct 25, 2024

PR Category

Execute Infrastructure

PR Types

Bug fixes

Description

移除 crop op infermeta 中,未知参数 shape 但知道 offset 的时候的 infer shape 逻辑,因为这样完全是错误的

x = ... # shape = [10, 10]
shape = paddle.to_tensor([6, 6]) # 注意是静态图,这里数值是未知的
crop(x, shape, offset=[2, 2])

这里原本是 crop 中间的 6x6,但原有逻辑会 infer 出来 [10-2 ,10-2],明显是错误的,这里并不清楚 shape 数值,此时 infermeta 应该是 [-1, -1],虽然推不出来,但至少不是错的

cc @megemini

PCard-66972

@paddle-bot
Copy link

paddle-bot bot commented Oct 25, 2024

你的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.

@SigureMo SigureMo merged commit d17799b into PaddlePaddle:develop Oct 26, 2024
27 checks passed
@SigureMo SigureMo deleted the phi/skip-infer-shape-for-crop-op-if-not-given-shape-dims branch October 26, 2024 11:54
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.

2 participants