docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Slice

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

    Calculates an output tensor by slicing the input tensor along given axes with given starts, ends, and steps.

    Declaration
    public override void Slice(Tensor X, Tensor O, ReadOnlySpan<int> starts, ReadOnlySpan<int> axes, ReadOnlySpan<int> steps)
    Parameters
    Type Name Description
    Tensor X

    The input tensor.

    Tensor O

    The output tensor to be computed and filled.

    ReadOnlySpan<int> starts

    The start index along each axis.

    ReadOnlySpan<int> axes

    The axes along which to slice. If this is null, the layer slices all axes.

    ReadOnlySpan<int> steps

    The step values for slicing. If this is null, the layer uses step size 1 throughout.

    Overrides
    CPUBackend.Slice(Tensor, Tensor, ReadOnlySpan<int>, ReadOnlySpan<int>, ReadOnlySpan<int>)
    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)