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

add logaddexp api #52284

Merged
merged 2 commits into from
May 9, 2023
Merged

add logaddexp api #52284

merged 2 commits into from
May 9, 2023

Conversation

zhiboniu
Copy link
Contributor

@zhiboniu zhiboniu commented Mar 29, 2023

PR types

New features

PR changes

APIs

Description

add logaddexp api

中文文档:
PaddlePaddle/docs#5845

@paddle-bot
Copy link

paddle-bot bot commented Mar 29, 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.

@zhiboniu zhiboniu force-pushed the dev_temp branch 2 times, most recently from 9a3e682 to 7581f67 Compare March 29, 2023 08:27
@CLAassistant
Copy link

CLAassistant commented Apr 3, 2023

CLA assistant check
All committers have signed the CLA.

@zhiboniu zhiboniu force-pushed the dev_temp branch 2 times, most recently from 8e3b4ff to 349c60c Compare April 3, 2023 09:38
@paddle-ci-bot
Copy link

paddle-ci-bot bot commented Apr 23, 2023

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.

@paddle-ci-bot
Copy link

paddle-ci-bot bot commented May 5, 2023

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(
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@jeff41404 jeff41404 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

@XiaoguangHu01 XiaoguangHu01 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

@jzhang533 jzhang533 left a comment

Choose a reason for hiding this comment

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

LGTM

@jeff41404 jeff41404 merged commit 72cb09e into PaddlePaddle:develop May 9, 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

5 participants