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

[Zero-Dim] support input 0D for paddle.moveaxis / quantile #49813

Merged
merged 2 commits into from
Jan 18, 2023

Conversation

zhwesky2010
Copy link
Contributor

PR types

New features

PR changes

APIs

Describe

[Zero-Dim] support input 0D for paddle.moveaxis/quantile

@paddle-bot
Copy link

paddle-bot bot commented Jan 13, 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.

@zhwesky2010 zhwesky2010 changed the title [Zero-Dim] support input 0D for paddle.moveaxis/quantile [Zero-Dim] support input 0D for paddle.moveaxis / quantile Jan 13, 2023
@zhwesky2010 zhwesky2010 force-pushed the 0D_moveaxis branch 8 times, most recently from de3f0cb to 89d9aba Compare January 18, 2023 04:05
raise ValueError("Each elemment of 'source' must be unique!")
count = Counter(dst).most_common(1)
if count[0][1] > 1:
if len(dst) != len(set(dst)):
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的改动看起来是一个不兼容修改,会不会出现
(0, 0) -> (1, 1) 情况

出现这种情况API能正常执行吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个作用是用来查重的,如果有重复的:
raise ValueError("Each elemment of 'source' must be unique!")
之前也是这个逻辑,这里改了下写法

wawltor
wawltor previously approved these changes Jan 18, 2023
Copy link
Contributor

@wawltor wawltor left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@wawltor wawltor left a comment

Choose a reason for hiding this comment

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

LGTM

@zhwesky2010 zhwesky2010 merged commit 26140ec into PaddlePaddle:develop Jan 18, 2023
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.

None yet

3 participants