docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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 null the operation generates a seed using System.Random().

    Returns
    Type Description
    Tensor

    The computed output tensor.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)