torch.Tensor.bernoulli
-
Tensor.
bernoulli
(*, generator=None) → Tensor Returns a result tensor where each is independently sampled from .
self
must have floating pointdtype
, and the result will have the samedtype
.
Tensor.
bernoulli
(*, generator=None) → TensorReturns a result tensor where each is independently
sampled from . self
must have
floating point dtype
, and the result will have the same dtype
.