docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Bernoulli

    Bernoulli(TensorFloat, Tensor, 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 override void Bernoulli(TensorFloat X, Tensor O, float? seed)
    Parameters
    Type Name Description
    TensorFloat X

    The probabilities input tensor.

    Tensor O

    The output tensor to be computed and filled.

    float? seed

    The optional seed to use for the random number generation. If this is null the operation generates a seed using System.Random().

    Overrides
    CPUBackend.Bernoulli(TensorFloat, Tensor, float?)
    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)