clamp Categorical logit from -inf to min_fifo when calculating entropy (#41002)
Summary:
Fixes gh-40553 by clamping logit values when calculating Categorical.entropy
Pull Request resolved: https://github.com/pytorch/pytorch/pull/41002
Reviewed By: mruberry
Differential Revision: D22436432
Pulled By: ngimel
fbshipit-source-id: 08b7c7b0c15ab4e5a56b3a8ec0d0237ad360202e