How to limit the range of sampling values

Hello, everyone. I just learned about pyro. I want to ask you how to limit the value sampled from Gaussian distribution to greater than 0

Hi @nana, unfortunately, this is not possible. You might be interested in choosing a different distribution, like LogNormal. Alternatively, you can make use of TruncatedNormal from NumPyro. Also, here is a useful discussion that points out further distributions: algorithm - Generating a gaussian distribution with only positive numbers - Stack Overflow