torch.igamma¶
-
torch.
igamma
(input, other, *, out=None) → Tensor¶ Computes the regularized lower incomplete gamma function:
where both and are weakly positive and at least one is strictly positive. If both are zero or either is negative then . in the equation above is the gamma function,
See
torch.igammac()
andtorch.lgamma()
for related functions.Supports broadcasting to a common shape and float inputs.
Note
The backward pass with respect to
input
is not yet supported. Please open an issue on PyTorch’s Github to request it.- Parameters
- Keyword Arguments
out (Tensor, optional) – the output tensor.
Example:
>>> a1 = torch.tensor([4.0]) >>> a2 = torch.tensor([3.0, 4.0, 5.0]) >>> a = torch.igammac(a1, a2) tensor([0.3528, 0.5665, 0.7350]) tensor([0.3528, 0.5665, 0.7350]) >>> b = torch.igamma(a1, a2) + torch.igammac(a1, a2) tensor([1., 1., 1.])