Skip to content

Conversation

fehiepsi
Copy link
Member

@fehiepsi fehiepsi commented Nov 7, 2020

Pair code with @fritzo and @eb8680.

Current issue:

  • [ ] We need to address expand logic under plate handler somewhere: either funsor or pyro/numpyro. The latter is prefered, according to the discussion. it seems that no need to do so. We can just simply skip plate handler processes a Funsor msg["fn"].

TODO

  • Lazily reduce plate dim for conditional.value.

Currently, there is several FIXME because we want to support the case Multinomial.value is a Funsor.

@fehiepsi fehiepsi added the WIP label Nov 12, 2020
eager_gamma_poisson)
eager.register(Binary, ops.SubOp, JointDirichletMultinomial, DirichletMultinomial)( # noqa: F821
eager_dirichlet_posterior)
eager.register(Reduce, ops.AddOp, Multinomial[Tensor, Funsor, Funsor], frozenset)( # noqa: F821
Copy link
Member Author

Choose a reason for hiding this comment

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

For pyro.collapse purpose, it is enough to use Multinomial[Tensor, Funsor, Tensor] here. Then we don't have to worry about x.value.reduce(...) issue in eager_plate_multinomial above. Is there a simple solution for that and I should go ahead and replace Funsor by Tensor here in the mean time?

Copy link
Member

Choose a reason for hiding this comment

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

should go ahead and replace Funsor by Tensor here in the mean time?

Sure, makes sense to me. I don't think there's a simple solution to the plate membership indication problem, at least not one simple enough to block this PR.

@fritzo fritzo merged commit 5432c7d into pyro-ppl:master Nov 17, 2020
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.

3 participants