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

Possible bug in poisson_weak #1

Open
gaurav-arya opened this issue Jun 28, 2024 · 0 comments
Open

Possible bug in poisson_weak #1

gaurav-arya opened this issue Jun 28, 2024 · 0 comments

Comments

@gaurav-arya
Copy link

In the poisson_weak implementation:

poisson_weak drate = ContT $ \dloss -> do
let (rate, rate') = split (exp (ln drate))
x_neg <- poisson rate
let x_pos = x_neg + 1
y_neg <- dloss x_neg
y_pos <- dloss x_pos
let grad = primal y_pos - primal y_neg
return (bundle (primal y_neg) (grad * rate'))

it looks like the derivative contribution from the continuation might be missing from the returned dual number. i.e. something like grad * rate' + tangent y_neg rather than just grad * rate'.

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

No branches or pull requests

1 participant