pyro-ppl / funsor

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

Add pattern to fuse nested Subs #577

Closed fritzo closed 3 years ago

fritzo commented 3 years ago

Fixes https://github.com/pyro-ppl/funsor/pull/553#issuecomment-945235391 pair coded with @eb8680

This prevents infinite recursion errors.

Tested