Closed JAEarly closed 2 years ago
A quick fix is just to add a small value to x[0]
, e.g.:
x[0] += 1e-8
Then this block runs and the subsequent plot looks correct.
My PR to PyTorch to fix this has been accepted, so this bug will no longer happen if you have the latest version of PyTorch. Closing as fixed.
In the Pyro Version of Chapter 1, the following code block has an issue:
It raises the error:
Problem: The underlying PyTorch code for the exponential distribution only allows inputs greater than zero, so as
x
includes zero, this block fails. I think the underlying issue is with PyTorch, so I've opened a PR to change the constraints for the exponential function from positive (>0) to non-negative (>=0). If that change goes through, this issue is moot, but if they don't change it, then the block will need to be updated.