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

Define (**) for AD type explicitly #4

Merged
merged 1 commit into from
Jul 3, 2023
Merged

Conversation

msakai
Copy link
Contributor

@msakai msakai commented Jul 3, 2023

Using implicit definition

x ** y = exp (log x * y)

makes its gradient to be

[(y * exp (log x * y)) / x, log x * exp (log x * y)]

and it's problematic when x = 0.

Using implicit definition x ** y = exp (log x * y) makes its gradient
to be [(y * exp (log x * y)) / x, log x * exp (log x * y)] and its
problematic when x = 0.
@ocramz ocramz merged commit 04884b9 into ocramz:master Jul 3, 2023
@ocramz
Copy link
Owner

ocramz commented Jul 3, 2023

Thank you!

@ocramz
Copy link
Owner

ocramz commented Jul 3, 2023

@msakai available from v 0.5 : https://hackage.haskell.org/package/ad-delcont-0.5.0.0

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

2 participants