docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method OneHot

    OneHot(TensorInt, TensorInt, int, int, int, int)

    Generates a one-hot tensor with a given depth, indices and on and off values.

    Declaration
    void OneHot(TensorInt indices, TensorInt O, int axis, int depth, int offValue, int onValue)
    Parameters
    Type Name Description
    TensorInt indices

    The indices input tensor.

    TensorInt O

    The output tensor to be computed and filled.

    int axis

    The axis along which the operation adds the one-hot representation.

    int depth

    The depth of the one-hot tensor.

    int offValue

    The value to use for an off element.

    int onValue

    The value to use for an on element.

    OneHot(TensorInt, TensorFloat, int, int, float, float)

    Generates a one-hot tensor with a given depth, indices and on and off values.

    Declaration
    void OneHot(TensorInt indices, TensorFloat O, int axis, int depth, float offValue, float onValue)
    Parameters
    Type Name Description
    TensorInt indices

    The indices input tensor.

    TensorFloat O

    The output tensor to be computed and filled.

    int axis

    The axis along which the operation adds the one-hot representation.

    int depth

    The depth of the one-hot tensor.

    float offValue

    The value to use for an off element.

    float onValue

    The value to use for an on element.

    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)