-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
add logaddexp api #52284
add logaddexp api #52284
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
9a3e682
to
7581f67
Compare
8e3b4ff
to
349c60c
Compare
Sorry to inform you that 349c60c's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
Sorry to inform you that ddd729a's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
|
||
def ref_logaddexp_old(x, y): | ||
y = np.broadcast_to(y, x.shape) | ||
out = np.log(1 + np.exp(np.minimum(x, y) - np.maximum(x, y))) + np.maximum( |
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.
it is better to use np.log1p
and np.absolute
?
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.
done
@@ -258,6 +258,7 @@ | |||
from .tensor.math import add # noqa: F401 | |||
from .tensor.math import subtract # noqa: F401 | |||
from .tensor.math import logsumexp # noqa: F401 | |||
from .tensor.math import logaddexp # noqa: F401 |
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.
add logaddexp
in __all__ list below ?
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.
done
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
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
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
PR types
New features
PR changes
APIs
Description
add logaddexp api
中文文档:
PaddlePaddle/docs#5845