docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ShallowReshape

    ShallowReshape(TensorShape)

    Returns a shallow copy of the Tensor with a new shape. The copy shares data storage with the original tensor.

    newShape.length must be equal to this.shape.length.

    Declaration
    public override Tensor ShallowReshape(TensorShape newShape)
    Parameters
    Type Name Description
    TensorShape newShape

    The shape of the returned tensor.

    Returns
    Type Description
    Tensor

    The tensor with the new shape sharing the same data storage as the original tensor.

    Overrides
    Tensor.ShallowReshape(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)