pyro-ppl / funsor

Functional tensors for probabilistic programming
https://funsor.pyro.ai
Apache License 2.0
236 stars 20 forks source link

Add a Delta -> Scatter pattern #531

Open fritzo opened 3 years ago

fritzo commented 3 years ago

Addresses https://github.com/pyro-ppl/numpyro/pull/991 pair coded with @eb8680 @fehiepsi @ordabayevy

This attempts to introduce a new rewrite Conatraction[...Delta...] -> Scatter.

This currently does not work. To run failing tests, try:

cd numpyro/
pytest -vx test/contrib/test_infer_discrete.py::test_scan_hmm_smoke --pdb