-
Notifications
You must be signed in to change notification settings - Fork 13
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
Invalid value when calling log_prob after sample #7
Comments
The exception is raised based on the support check, meaning that 1.0 doesn't land into the support interval. Since loc and scale aren't given in the snippet, it is hard to say if this is an issue with precision or incorrect usage of parameters. The interface was designed to follow conventions of the similar scipy function |
Here is a reproducible example:
Some values are more than 1 and some are -inf:
|
One thing I'd try first is plug these values in the unit test here https://github.com/toshas/torch_truncnorm/blob/main/tests/test.py#L97 and see if it passes the check against scipy. If not, there is a bug.. |
I added a line It gives:
The second error is not due to my test, you might want to fix it in another issue. The first IS a bug. |
The reason seems to be that extreme values for the |
My code looks like
It looks like
action_pt
can take the value1.0
and causeslog_prob
to raise an error:I don't know if the error is:
The text was updated successfully, but these errors were encountered: