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

Correct event dimensions for ReshapeTransform. #1895

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

tillahoffmann
Copy link
Contributor

This PR fixes the event dimensions of the ReshapeTransform such that ReshapeTransform((12, 13), (3, 4, 13)) correctly transforms from three to two event dimensions.

>>> from numpyro.distributions.transforms import ReshapeTransform
>>> t = ReshapeTransform((12, 13), (3, 4, 13))
>>> t.domain.event_dim
3
>>> t.codomain.event_dim
2

This PR depends on #1894 because AutoBatched* guides requires correct handling of event dimensions by ComposeTransform.

@fehiepsi
Copy link
Member

@tillahoffmann There is a merge conflict. Thanks for fixing the issue!

@tillahoffmann
Copy link
Contributor Author

Thanks for the fast review. Merge conflicts are resolved.

@fehiepsi fehiepsi merged commit 6d5e508 into pyro-ppl:master Oct 28, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants