docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Strides

    Strides(int)

    Returns the product of the dimensions of the tensor shape after a given axis. Negative axes counts backwards from the inner dimension.

    The strides of a tensor tell us how many elements we have to skip in flattened memory to move to the next position along a given index.

    Declaration
    public int Strides(int axis)
    Parameters
    Type Name Description
    int axis

    The axis to calculate the stride length at.

    Returns
    Type Description
    int

    The stride length at the axis.

    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)