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

Support different transformed and untransformed variable lengths #241

Closed
mohamed82008 opened this issue May 8, 2021 · 6 comments
Closed

Comments

@mohamed82008
Copy link
Member

It would be nice to relax the assumption that transformed and untransformed variables must have the same linearized lengths. We can introduce a new function variable_length which takes a distribution argument and a transformed kwarg. This function can then be defined for common distributions.

@devmotion
Copy link
Member

I thought there was an issue about this in Bijectors, for inputs and outputs of different size but also more generally for inputs and outputs of different types, but I can't find it. So maybe it was only discussed in some PR.

@mohamed82008
Copy link
Member Author

That's true but there is also a DPPL issue mostly in the VarInfo where linearized values in the transformed and untransformed domains are assumed to have the same length.

@mohamed82008
Copy link
Member Author

A temporary solution is to resize when calling link! or invlink! and re-calculate the indices.

@devmotion
Copy link
Member

Or to not transform in-place (this was also discussed at some point) and/or to use a different non-linearized structure (IIRC there are some discussions that were moved to AbstractPPL).

@devmotion
Copy link
Member

As a temporary workaround you can just fill the transformed values with 0s (or some other value) but I guess that's maybe what you want to avoid here.

@yebai
Copy link
Member

yebai commented Aug 2, 2023

Closed in favour of #461

@yebai yebai closed this as completed Aug 2, 2023
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

No branches or pull requests

3 participants