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

Implement Expect #28

Closed
HEmile opened this issue Feb 27, 2020 · 1 comment · Fixed by #40
Closed

Implement Expect #28

HEmile opened this issue Feb 27, 2020 · 1 comment · Fixed by #40

Comments

@HEmile
Copy link
Owner

HEmile commented Feb 27, 2020

Implementing Expect is not as easy as I hoped. Unfortunately, in discrete VAEs, for example, you pass logits with shape [batch, latents, categories]. enumerate_support() does not recognize that batch is independent, but the different latents are dependent! It only enumerates the support over the categories dimension, but it should also enumerate over the latents dimension. To do this automatically however requires independency assumptions, which probably brings us back to Issue #4.

@HEmile
Copy link
Owner Author

HEmile commented Feb 27, 2020

Idea: Automatically assume all non-batched dimensions dependent, and enumerate over all dimensions (will probably throw an error). Figure out how to do that, probably possible. To make sure the batched dimension is ignored, maybe use storch.denote_independent(torch.tensor, dim) (in this case, storch.denote_independent(logits, 0)). See #4.

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 a pull request may close this issue.

1 participant