torch.Tensor.cauchy_ — PyTorch 2.7 documentation (original) (raw)
Tensor.cauchy_(median=0, sigma=1, *, generator=None) → Tensor¶
Fills the tensor with numbers drawn from the Cauchy distribution:
f(x)=1πσ(x−median)2+σ2f(x) = \dfrac{1}{\pi} \dfrac{\sigma}{(x - \text{median})^2 + \sigma^2}
Note
Sigma (σ\sigma) is used to denote the scale parameter in Cauchy distribution.
To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.