pytorch / 2 / generated / torch.tensor.geometric_.html

torch.Tensor.geometric_

Tensor.geometric_(p, *, generator=None) → Tensor

Fills self tensor with elements drawn from the geometric distribution:

f ( X = k ) = ( 1 p ) k 1 p f(X=k) = (1 - p)^{k - 1} p

© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.Tensor.geometric_.html