funsor
funsor copied to clipboard
Make Distribution.enumerate_support return a Delta
In #346, motivated by work in Pyro on a Funsor-based Pyro backend, I added a generic enumerate_support
method to funsor.distribution.Distribution
which returns a to_funsor
-ed version of the output of the underlying backend distribution's enumerate_support
method. However, it would be more natural from the rest of Funsor's perspective to have enumerate_support
return a Delta
over the support values plus a weight tensor, like Funsor.sample
.
This issue is to remind me to make that change at some point after more of contrib.funsor
is finished in Pyro, unless someone else wants to take a stab at it.