torch.distributions.Beta.entropy returns negative values #152845
Labels
module: distributions
Related to torch.distributions
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
๐ Describe the bug
Beta distribution returns negative values for perfectly legal alpha / beta parameters. It seems that the sign is flipped. The following code shows the results of the pytorch built-in function vs. a custom implementation.
Output of above script:
Versions
PyTorch version: 2.7.0+cu128
Is debug build: False
CUDA used to build PyTorch: 12.8
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.5 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.35
Python version: 3.11.9 (main, Apr 6 2024, 17:59:24) [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-6.8.0-57-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.4.99
cc @fritzo @neerajprad @alicanb @nikitaved
The text was updated successfully, but these errors were encountered: