pytorch
f596aa8b - Poisson zero rate (#61511)

Commit
4 years ago
Poisson zero rate (#61511) Summary: This PR fixes https://github.com/pytorch/pytorch/issues/53485 by allowing zero rates for the Poisson distribution. This implementation is consistent with `scipy.stats.poisson` which admits zero rates. In addition to addressing the aforementioned issue, this PR makes two supporting changes: 1. add a `nonnegative` constraint to enforce non-negative rates for the Poisson distribution. 2. adjust the evaluation of the gradient of `xlogy` such that it is well defined for `x == 0 and y == 0`. Pull Request resolved: https://github.com/pytorch/pytorch/pull/61511 Reviewed By: ejguan Differential Revision: D30352917 Pulled By: albanD fbshipit-source-id: f3d33da58360e80d75eb83519f199b93232a2a2d
Author
Parents
Loading