pytorch / 1 / 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 ) = p k 1 ( 1 p ) f(X=k) = p^{k - 1} (1 - p)

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