InferPy icon indicating copy to clipboard operation
InferPy copied to clipboard

Constraints in Parameters

Open rcabanasdepaz opened this issue 7 years ago • 1 comments

When defining parameters, a set of constraints could be used. This resambles to Pyro parameters. In this regard, the following code

    qtheta_scale = tf.math.softplus(models.Parameter(1., name="qtheta_scale"))

might be written as

    qtheta_scale = models.Parameter(1., name="qtheta_scale", constraints=constraints.positive)

rcabanasdepaz avatar Feb 25 '19 11:02 rcabanasdepaz

This can be implemented with bijectors. As this will be required for MCMC inference in some cases, I suggest to wait and see if a common interface can be implemented for every case where some objects are restricted to some specific universe.

jcozar87 avatar May 29 '19 15:05 jcozar87