pyro-ppl / pyro

Deep universal probabilistic programming with Python and PyTorch
http://pyro.ai
Apache License 2.0
8.51k stars 984 forks source link

Incorrect `codomain` for `ELUTransform` #2806

Open stefanwebb opened 3 years ago

stefanwebb commented 3 years ago

In this line: https://github.com/pyro-ppl/pyro/blob/75ec2bc56a72730f73581b042abe9c24b8f87058/pyro/distributions/transforms/basic.py#L20

we should actually have codomain = greater_than(-1.).

See here: https://pytorch.org/docs/stable/generated/torch.nn.ELU.html

stefanwebb commented 3 years ago

(Will submit a small PR for this shortly!)

stefanwebb commented 3 years ago

Also: https://github.com/pyro-ppl/pyro/blob/dev/pyro/distributions/transforms/basic.py#L53