docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor Constant

    Constant()

    Initializes and returns an empty Constant.

    Declaration
    public Constant()

    Constant(string, Tensor)

    Initializes and returns a Constant from a given name and tensor.

    Declaration
    public Constant(string name, Tensor tensor)
    Parameters
    Type Name Description
    string name

    The name to use for the constant.

    Tensor tensor

    The tensor to take the shape, dataType and weights of the constant from.

    Constant(string, float[])

    Initializes and returns a vector Constant from a given name and float array.

    Declaration
    public Constant(string name, float[] value)
    Parameters
    Type Name Description
    string name

    The name to use for the constant.

    float[] value

    The float array of values.

    Constant(string, int[])

    Initializes and returns a vector Constant from a given name and int array.

    Declaration
    public Constant(string name, int[] value)
    Parameters
    Type Name Description
    string name

    The name to use for the constant.

    int[] value

    The int array of values.

    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)