docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Length

    Length(int)

    Returns the number of elements represented by the TensorShape, starting from a given axis. A negative axis counts backwards from the inner dimension.

    Declaration
    public int Length(int start)
    Parameters
    Type Name Description
    int start

    The first axis to count length from.

    Returns
    Type Description
    int

    The number of elements in the shape.

    Length(int, int)

    Returns the number of elements represented by the TensorShape, between the start and end axes. Negative axes counts backwards from the inner dimension.

    Declaration
    public int Length(int start, int end)
    Parameters
    Type Name Description
    int start

    The first axis to count length from.

    int end

    The exclusive final axis to count length to.

    Returns
    Type Description
    int

    The number of elements in the shape.

    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)