torch.Tensor.geometric_¶
- Tensor.geometric_(p, *, generator=None) Tensor ¶
使用从几何分布中提取的元素填充
self
张量注意
torch.Tensor.geometric_()
中的第 k 次试验是第一次成功,因此采样范围为 ,而torch.distributions.geometric.Geometric()
中的 次试验是第一次成功,因此采样范围为 。
使用从几何分布中提取的元素填充 self
张量
注意
torch.Tensor.geometric_()
中的第 k 次试验是第一次成功,因此采样范围为 ,而 torch.distributions.geometric.Geometric()
中的 次试验是第一次成功,因此采样范围为 。