pytorch
69a8c92d - Fix comparison of batched_prop vs unbatched_prob in test_distributions (#87977)

Commit
2 years ago
Fix comparison of batched_prop vs unbatched_prob in test_distributions (#87977) When using SciPy >= 1.7 wishart_log_prob runs into singular samples which means there are `inf`s in `batched_prop` and `unbatched_prop`. The difference of 2 `inf`s is `nan` which will fail the `equal(0` check. However passing the tensors directly to `assertEqual` is not only supported but the correct way as it will handle `inf` values etc. Change the same code in 2 more tests: - test_multivariate_normal_log_prob - test_lowrank_multivariate_normal_log_prob Pull Request resolved: https://github.com/pytorch/pytorch/pull/87977 Approved by: https://github.com/soulitzer
Author
Committer
Parents
Loading