Skip to content
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

Allow to use NeuTra on models with plates #1826

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

fehiepsi
Copy link
Member

@fehiepsi fehiepsi commented Jul 1, 2024

Fixes #1694

Currently, in NeuTra reparam, we reparam variables via an unconstrained joint value. If the first variable is inside a plate context, such joint value will also be drawn under such plate - it will be broadcasted. This PR blocks such issue by introducing a block_plates field in sample(..., infer=...). Those plates from the model will be blocked on that joint variable.

Copy link
Member

@ordabayevy ordabayevy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. There is a type on line 229 in reparam.py file. neutra is misspelled as netra.

@fehiepsi fehiepsi merged commit 89ca117 into pyro-ppl:master Jul 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug in NeuTraReparam
2 participants