-
-
Notifications
You must be signed in to change notification settings - Fork 987
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
Update torch_patch.py #3174
Update torch_patch.py #3174
Conversation
Removed the PositiveDefinite() function for the one from PyTorch to be used instead, as is what less precise resulting in errors for certain cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @S163669!
Passed scale_tril to dist.MultivariateNormal as keyword argument instead of positional argument as it otherwise gets identified as being a covariance matrix.
@fehiepsi It should be good now :) |
@S163669 could you merge the dev branch? It includes some fixes to make tests pass for the changes here. |
@fehiepsi I just did :) |
@S163669 Looks like that the additional symmetric check of the upstream PositiveDefinite constraint is making GP tutorial failing. Could you add |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@fehiepsi Yes, it's done. |
Sorry, I didn't run the tutorial until the end to catch all errors. Could you update the cell 27 to
We need to use float64 numpy array after setting DoubleTensor. Thanks! |
No worries @fehiepsi . It is changed now! |
Thanks, @S163669! |
Removed the PositiveDefinite() function for the one from PyTorch to be used instead, as the way of checking was less precise than the one from PyTorch resulting in errors for certain cases.
More details can be found here on the Pyro forum:
https://forum.pyro.ai/t/positive-definiteness-error-due-to-import-of-pyro/4887/5