docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Slice

    Slice(ReadOnlySpan<int>, ReadOnlySpan<int>, ReadOnlySpan<int>, ReadOnlySpan<int>)

    Creates a TensorShape that results from slicing this along given axes with given starts, ends, and steps.

    Declaration
    public TensorShape Slice(ReadOnlySpan<int> starts, ReadOnlySpan<int> ends, ReadOnlySpan<int> axes, ReadOnlySpan<int> steps)
    Parameters
    Type Name Description
    ReadOnlySpan<int> starts

    The start indices along each of the axes.

    ReadOnlySpan<int> ends

    The end indices along each of the axes.

    ReadOnlySpan<int> axes

    The optional axes along which to slice. The default value is [0, 1, 2...rank-1].

    ReadOnlySpan<int> steps

    The optional step sizes for each of the axes. The default value is [1, 1, 1...1]

    Returns
    Type Description
    TensorShape

    The sliced tensor 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)