-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
LogSumExp of -inf
returns nan
instead of -inf
#461
Labels
Comments
ricardoV94
changed the title
Log of Sum of
Log of Sum of Jun 4, 2021
Zero
returns nan
instead of -inf
zero
returns nan
instead of -inf
ricardoV94
changed the title
Log of Sum of
LogSumExp of Jun 4, 2021
zero
returns nan
instead of -inf
-inf
returns nan
instead of -inf
I think it has to do with an automatic optimization which is basically the same as what the pymc3 x = at.vector('x')
res = at.log(at.exp(x[0]) + at.exp(x[1]))
fun = aesara.function([x], res)
aesara.dprint(fun)
The softplus input in the graph above has a |
brandonwillard
added
bug
Something isn't working
important
graph rewriting
help wanted
Extra attention is needed
labels
Jun 4, 2021
ricardoV94
added a commit
to ricardoV94/aesara
that referenced
this issue
Jun 6, 2021
ricardoV94
added a commit
to ricardoV94/aesara
that referenced
this issue
Jun 7, 2021
ricardoV94
added a commit
to ricardoV94/aesara
that referenced
this issue
Jun 7, 2021
ricardoV94
added a commit
to ricardoV94/aesara
that referenced
this issue
Jun 7, 2021
… it non-symmetric Fixes aesara-devs#461
ricardoV94
added a commit
to ricardoV94/aesara
that referenced
this issue
Jun 7, 2021
ricardoV94
added a commit
to ricardoV94/aesara
that referenced
this issue
Jun 7, 2021
… it non-symmetric Fixes aesara-devs#461
ricardoV94
added a commit
to ricardoV94/aesara
that referenced
this issue
Jun 9, 2021
ricardoV94
added a commit
to ricardoV94/aesara
that referenced
this issue
Jun 9, 2021
… it non-symmetric Fixes aesara-devs#461
ricardoV94
added a commit
that referenced
this issue
Jun 9, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
for reference in numpy we get
-inf
, together with a divide by zero encountered in logThis showed up in the pymc3
logsumexp
function which returnsnan
with this input:Whereas the scipy reference works fine
Weirdly it happens with addition, but not subtraction or multiplication, so maybe the problem is not the sum but the addition?
The text was updated successfully, but these errors were encountered: