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

Fix bug of infer shape for slice #43443

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

zyfncg
Copy link
Contributor

@zyfncg zyfncg commented Jun 13, 2022

PR types

Bug fixes

PR changes

Others

Describe

修复静态图下sliceaxes为负数时infershape结果异常的问题。

问题示例:

x = paddle.static.data(shape=[-1, 460, 12], name='x')
y = paddle.slice(input=x, axes=[-1], starts=[1], ends=[2])
print(y.shape)

# 修复前结果:(-1, 460, 12)
# 预期结果:(-1, 460, 1)

@paddle-bot-old
Copy link

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

@zyfncg zyfncg merged commit e0a0146 into PaddlePaddle:develop Jun 14, 2022
@zyfncg zyfncg deleted the fix_slice_infer_shape branch June 14, 2022 02:26
zyfncg added a commit to zyfncg/Paddle that referenced this pull request Jun 14, 2022
phlrain pushed a commit that referenced this pull request Jun 15, 2022
…3432)

* fix bug of strided_slice (#43388)

* fix stride_slice bug

* fix bug

* fix bug of infer shape for slice (#43443)
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