docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ConstantOfShape

    ConstantOfShape(TensorShape, float)

    Generates a tensor with a given shape filled with a given value.

    Declaration
    public TensorFloat ConstantOfShape(TensorShape X, float value)
    Parameters
    Type Name Description
    TensorShape X

    The input tensor shape.

    float value

    The fill value.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    ConstantOfShape(TensorShape, int)

    Generates a tensor with a given shape filled with a given value.

    Declaration
    public TensorInt ConstantOfShape(TensorShape X, int value)
    Parameters
    Type Name Description
    TensorShape X

    The input tensor shape.

    int value

    The fill value.

    Returns
    Type Description
    TensorInt

    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)