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

Bug in StandardUniform #19

Open
mkirchler opened this issue May 6, 2022 · 0 comments
Open

Bug in StandardUniform #19

mkirchler opened this issue May 6, 2022 · 0 comments

Comments

@mkirchler
Copy link

Hi, probably not a big issue as most people don't use the uniform distribution, but I think the log-prob is wrong. It should return -inf if any element of a data point is outside the bounds, but currently, it just averages how many are out of bounds. For example:

unif = StandardUniform((2,))
x = torch.tensor([-0.5, 0.5])
unif.log_prob(x)
# returns -0.69 but should be -inf
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