-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
【Hackathon 6th No.24】为 paddle.quantile/nanquantile 功能增强 -part #62937
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
"Type of q should be int, float, list or tuple, or tensor" | ||
) | ||
for q_num in q: | ||
if not in_dynamic_or_pir_mode() and isinstance(q_num, Variable): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
条件判断太多的话,加一下括号包一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没懂怎么包
valid_counts = mask.logical_not().sum( | ||
axis=axis, keepdim=True, dtype='float64' | ||
) | ||
valid_counts = mask.logical_not().sum(axis=axis, keepdim=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x如果为int的话受影响吗
@@ -733,42 +774,49 @@ def quantile(x, q, axis=None, keepdim=False): | |||
|
|||
>>> y1 = paddle.quantile(y, q=0.5, axis=[0, 1]) | |||
>>> print(y1) | |||
Tensor(shape=[], dtype=float64, place=Place(cpu), stop_gradient=True, | |||
Tensor(shape=[], dtype=float32, place=Place(cpu), stop_gradient=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
输入一个int Tensor试试
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
赛题要求是与torch对齐,但是torch不支持int类型的输入,是否要和torch对齐呢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,API文档和API映射文档请注意同步修改一下
PR types
Others
PR changes
APIs
Description
为 paddle.quantile/nanquantile 功能增强
本地单测:

中文文档修改:PaddlePaddle/docs#6353