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
Stray singleton dimension in mcabc.py? #12
Comments
Thanks for reporting this! Which version of PyTorch and Pyro are you on? I suspect that this might have to do something with changes upstream, we will have a look |
I'm on 1.8.0 for PyTorch and 1.6.0 for Pyro. Thank you for looking into this! |
It seems that the error is due to some change in PyTorch. For Update: @janfb and me drilled down further, turns out this is due to a change that enables validation of distributions (including the empirical one used here) which will raise an error before automatic squeezing. We could disable it globally by setting |
I'd be happy to contribute an attempted fix. Is it only Or perhaps this discussion is better suited for a PR anyway. |
Great, thanks a lot!
Yes, SNPE should be ok as it is, since its posterior distribution is part of |
I've merged the PR and released a new version including it as v1.0.6. Thank you! |
Thanks for building out and maintaining this package! There was definitely a need for something like this in the ABC/Likelihood Free community.
I'm hitting a seemingly stray dimension in
mcabc.py
:which is returning a stacktrace like:
A bit of digging shows that the shape of
true_parameters
in this is coming out at[1,2]
. Changing this line tolog_prob_true_parameters = posterior.log_prob(true_parameters.squeeze())
does indeed make this run.However, I'm not sure if the correct fix involves squeezing the tensor further upstream?
Thanks for any help!
The text was updated successfully, but these errors were encountered: