Definition of a stochastic function

I have a stochastic function that returns a sample which I am calling via numpyro.sample. However I am getting complaints with respect to the function’s missing attributes like batch_sample and expand. Does this imply I need to wrap my stochastic function in Distribution? Docs for sample indicate:

fn – a stochastic function that returns a sample.

Yes I guess you can inherit this class numpyro.distributions.distribution — NumPyro documentation

1 Like