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

support 0d tensor for interpolate #49929

Merged
merged 9 commits into from
Jan 31, 2023
Merged

Conversation

tink2123
Copy link
Contributor

PR types

New features

PR changes

Ops

Describe

  • support 0d tensor for intepolate att "scale" "scale_factor"
  • add unittest for test_zero_dim_tensor and test_interpolate_op

@paddle-bot
Copy link

paddle-bot bot commented Jan 18, 2023

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

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

LGTM


if (scale_tensor_dim.size() == 1) {
PADDLE_ENFORCE_EQ(
scale_tensor_dim[0] == 2 || scale_tensor_dim[0] == 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

什么情况下scale的shape会是[2]呀

@zhwesky2010 zhwesky2010 merged commit 2e156ac into PaddlePaddle:develop Jan 31, 2023
pangengzheng pushed a commit to pangengzheng/Paddle that referenced this pull request Feb 2, 2023
* support 0d tensor for interpolate

* support 0d tensor for interpolate

* add xpu unittest for interp

* update unittest for interpolate

* fix coverage

* fix code style

* fix for coverage

* fix coverage
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