torch.distributions.utils.clamp_probs
- torch.distributions.utils.clamp_probs(probs)
Clamps the probabilities to be in the open interval (0, 1).
The probabilities would be clamped between eps and 1 - eps, and eps would be the smallest representable positive number for the input data type.
- Parameters:
probs (Tensor) – A tensor of probabilities.
- Returns