-
Notifications
You must be signed in to change notification settings - Fork 155
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
likelihood_nn embedding_net num_blocks #310
Comments
You are probably using sbi version |
You are right! I updated to Traceback (most recent call last):
File "sbi_test.py", line 30, in <module>
posterior = inference(num_simulations=500)
File "/home/twenger/anaconda3/lib/python3.7/site-packages/sbi/inference/snle/snle_a.py", line 128, in __call__
return super().__call__(**kwargs)
File "/home/twenger/anaconda3/lib/python3.7/site-packages/sbi/inference/snle/snle_base.py", line 154, in __call__
neural_net=self._build_neural_net(theta, x),
File "/home/twenger/anaconda3/lib/python3.7/site-packages/sbi/utils/get_nn_models.py", line 153, in build_fn
return build_nsf(batch_x=batch_x, batch_y=batch_theta, **kwargs)
File "/home/twenger/anaconda3/lib/python3.7/site-packages/sbi/neural_nets/flow.py", line 204, in build_nsf
for i in range(num_transforms)
File "/home/twenger/anaconda3/lib/python3.7/site-packages/sbi/neural_nets/flow.py", line 204, in <listcomp>
for i in range(num_transforms)
File "/home/twenger/anaconda3/lib/python3.7/site-packages/nflows/transforms/coupling.py", line 460, in __init__
unconditional_transform=unconditional_transform,
File "/home/twenger/anaconda3/lib/python3.7/site-packages/nflows/transforms/coupling.py", line 53, in __init__
self.num_transform_features * self._transform_dim_multiplier(),
File "/home/twenger/anaconda3/lib/python3.7/site-packages/sbi/neural_nets/flow.py", line 191, in <lambda>
num_blocks=num_blocks,
NameError: name 'num_blocks' is not defined |
Ok, damn, this is a major bug from our side. I'll fix it asap and make a new release v0.12.1. I'll let you know once it's on PyPI. If you can't wait, the fix is already in the Thanks for reporting this!!! |
Got it, thanks! |
The new release with the fix is out. Thanks again for reporting! |
I am trying to use an embedding net with likelihood_nn to reduce my parameter dimensionality from 25 to 10. This fails with a
RuntimeError: size mismatch
.Here is a minimum working example based on the example in the docs.
And the traceback:
The text was updated successfully, but these errors were encountered: