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
    public override void OneHot(TensorInt X, TensorInt O, int axis, int depth, int offValue, int onValue)
    Parameters
    Type Name Description
    TensorInt X
    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.

    Overrides
    CPUBackend.OneHot(TensorInt, TensorInt, int, int, int, int)

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

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

    Declaration
    public override void OneHot(TensorInt X, TensorFloat O, int axis, int depth, float offValue, float onValue)
    Parameters
    Type Name Description
    TensorInt X
    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.

    Overrides
    CPUBackend.OneHot(TensorInt, TensorFloat, int, int, float, 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)