Fills each location of self
with an independent sample from Bernoulli ( p ) \text{Bernoulli}(\texttt{p}) Bernoulli(p). self
can have integral dtype
.
p
should either be a scalar or tensor containing probabilities to be used for drawing the binary random number.
If it is a tensor, the i t h \text{i}^{th} ith element of self
tensor will be set to a value sampled from Bernoulli ( p_tensor[i] ) \text{Bernoulli}(\texttt{p\_tensor[i]}) Bernoulli(p_tensor[i]). In this case p must have floating point dtype
.
See also bernoulli()
and torch.bernoulli()
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4