docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Unsqueeze

    Unsqueeze(int)

    Creates a TensorShape by duplicating this and inserting a dimension of size one at a given axis. For example if this is (2), and the value of axis is 0, the method returns (1, 2).

    Declaration
    public TensorShape Unsqueeze(int axis)
    Parameters
    Type Name Description
    int axis

    The axis at which to unsqueeze.

    Returns
    Type Description
    TensorShape

    The unsqueezed tensor shape.

    Unsqueeze(ReadOnlySpan<int>)

    Creates a TensorShape by duplicating this and inserting a dimension of size one at a given axis. For example if this is (2), and the value of axis is 0, the method returns (1, 2).

    Declaration
    public TensorShape Unsqueeze(ReadOnlySpan<int> axes)
    Parameters
    Type Name Description
    ReadOnlySpan<int> axes

    The axes at which to unsqueeze.

    Returns
    Type Description
    TensorShape

    The unsqueezed tensor shape.

    In This Article
    • Unsqueeze(int)
    • Unsqueeze(ReadOnlySpan<int>)
    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)