diff --git a/numpyro/distributions/transforms.py b/numpyro/distributions/transforms.py index ef433fceb..6fe21a863 100644 --- a/numpyro/distributions/transforms.py +++ b/numpyro/distributions/transforms.py @@ -160,6 +160,11 @@ def __call__(self, x): return jnp.abs(x) def _inverse(self, y): + warnings.warn( + "AbsTransform is not a bijective transform." + " The inverse of `y` will be `y`.", + stacklevel=find_stack_level(), + ) return y diff --git a/numpyro/infer/reparam.py b/numpyro/infer/reparam.py index 1530193f6..ab4dfec29 100644 --- a/numpyro/infer/reparam.py +++ b/numpyro/infer/reparam.py @@ -187,7 +187,7 @@ class NeuTraReparam(Reparam): """ Neural Transport reparameterizer [1] of multiple latent variables. - This uses a trained :class:`~pyro.contrib.autoguide.AutoContinuous` + This uses a trained :class:`~numpyro.infer.autoguide.AutoContinuous` guide to alter the geometry of a model, typically for use e.g. in MCMC. Example usage:: diff --git a/numpyro/util.py b/numpyro/util.py index 3cccef8c1..3f826fd19 100644 --- a/numpyro/util.py +++ b/numpyro/util.py @@ -444,9 +444,9 @@ def format_shapes( def model(*args, **kwargs): ... - with numpyro.handlers.seed(rng_key=1): + with numpyro.handlers.seed(rng_seed=1): trace = numpyro.handlers.trace(model).get_trace(*args, **kwargs) - numpyro.util.format_shapes(trace) + print(numpyro.util.format_shapes(trace)) """ if not trace.keys(): return title