pytorch
fc9f013c - HalfCauchy should ValueError if _validate_args (#50403)

Commit
3 years ago
HalfCauchy should ValueError if _validate_args (#50403) Summary: **Expected**: When I run `torch.distributions.HalfCauchy(torch.tensor(1.0), validate_args=True).log_prob(-1)`, I expect a `ValueErro` because that is the behavior of other distributions (e.g. Beta, Bernoulli). **Actual**: No run-time error is thrown, but a `-inf` log prob is returned. Fixes https://github.com/pytorch/pytorch/issues/50404 --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/pytorch/pytorch/50403) Pull Request resolved: https://github.com/pytorch/pytorch/pull/50403 Reviewed By: mrshenli Differential Revision: D25907131 Pulled By: neerajprad fbshipit-source-id: ceb63537e5850809c8b32cf9db0c99043f381edf
Author
Parents
Loading