InferPy
InferPy copied to clipboard
Constraints in Parameters
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)
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.