docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Reduce

    Reduce(int, bool)

    Removes a dimension at axis. For example, if this is (2, 3, 4, 5), the value of axis is 1, and the value of keepDim is true, the method returns (2, 1, 4, 5).

    Declaration
    public TensorShape Reduce(int axis, bool keepDim = true)
    Parameters
    Type Name Description
    int axis

    The axis along which to reduce.

    bool keepDim

    When the value is true, Sentis replaces the dimension with 1.

    Returns
    Type Description
    TensorShape

    The reduced tensor shape.

    Reduce(ReadOnlySpan<int>, bool)

    Creates a TensorShape by removing the dimensions at axes. For example, if this is (2, 3, 4, 5), axis is {1, 2} and the value of keepDim is true, the method returns (2, 1, 1, 5).

    Declaration
    public TensorShape Reduce(ReadOnlySpan<int> axes, bool keepDim = true)
    Parameters
    Type Name Description
    ReadOnlySpan<int> axes

    The axes along which to reduce.

    bool keepDim

    When the value is true, Sentis replaces the reduced axes with 1. Otherwise Sentis removes the reduced axes.

    Returns
    Type Description
    TensorShape

    The reduced 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)