docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Reshape

    Reshape(ReadOnlySpan<int>, bool)

    Creates a TensorShape by duplicating this and reshaping the dimensions to those given.

    If a dimension in the shape array is -1, Sentis infers the value from the size of the TensorShape and the remaining dimensions. Only one dimension can be -1.

    Declaration
    public TensorShape Reshape(ReadOnlySpan<int> shape, bool allowZero = false)
    Parameters
    Type Name Description
    ReadOnlySpan<int> shape

    The new shape as a span of integers.

    bool allowZero

    When the value is true, Sentis sets a dimension to zero if the new shape includes a zero. Otherwise Sentis retains the corresponding size at that axis from the original shape.

    Returns
    Type Description
    TensorShape
    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)