Method Bernoulli
Bernoulli(TensorFloat, DataType, float?)
Generates an output tensor with values 0 or 1 from a Bernoulli distribution. The input tensor contains the probabilities to use for generating the output values.
Declaration
public Tensor Bernoulli(TensorFloat X, DataType dataType, float? seed)
Parameters
Type | Name | Description |
---|---|---|
TensorFloat | X | The probabilities input tensor. |
DataType | dataType | The data type of the output tensor. |
float? | seed | The optional seed to use for the random number generation. If this is |
Returns
Type | Description |
---|---|
Tensor | The computed output tensor. |