torch.Tensor.Tensor.bernoulli_
Tensor.bernoulli_(options?: BernoulliOptions): thisTensor.bernoulli_(p: number | Tensor, options?: BernoulliOptions): thisFills self tensor with Bernoulli samples (0 or 1) with probability p.
Parameters
optionsBernoulliOptionsoptional
Returns
this