docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor TensorShape

    TensorShape(int, int, int, int, int, int, int, int)

    Initializes and returns an instance of TensorShape with a rank of 8: (d7, d6, d5, d4, d3, d2, d1, d0).

    For example (2, 3, 4, 5, 6, 7, 8, 9).

    Declaration
    public TensorShape(int d7, int d6, int d5, int d4, int d3, int d2, int d1, int d0)
    Parameters
    Type Name Description
    int d7

    Length of axis 7.

    int d6

    Length of axis 6.

    int d5

    Length of axis 5.

    int d4

    Length of axis 4.

    int d3

    Length of axis 3.

    int d2

    Length of axis 2.

    int d1

    Length of axis 1.

    int d0

    Length of axis 0.

    TensorShape(int, int, int, int, int, int, int)

    Initializes and returns an instance of TensorShape with a rank of 7: (d6, d5, d4, d3, d2, d1, d0).

    For example (3, 4, 5, 6, 7, 8, 9).

    Declaration
    public TensorShape(int d6, int d5, int d4, int d3, int d2, int d1, int d0)
    Parameters
    Type Name Description
    int d6

    Length of axis 6.

    int d5

    Length of axis 5.

    int d4

    Length of axis 4.

    int d3

    Length of axis 3.

    int d2

    Length of axis 2.

    int d1

    Length of axis 1.

    int d0

    Length of axis 0.

    TensorShape(int, int, int, int, int, int)

    Initializes and returns an instance of TensorShape with a rank of 6: (d5, d4, d3, d2, d1, d0).

    For example (4, 5, 6, 7, 8, 9).

    Declaration
    public TensorShape(int d5, int d4, int d3, int d2, int d1, int d0)
    Parameters
    Type Name Description
    int d5

    Length of axis 5.

    int d4

    Length of axis 4.

    int d3

    Length of axis 3.

    int d2

    Length of axis 2.

    int d1

    Length of axis 1.

    int d0

    Length of axis 0.

    TensorShape(int, int, int, int, int)

    Initializes and returns an instance of TensorShape with a rank of 5: (d4, d3, d2, d1, d0).

    For example (5, 6, 7, 8, 9).

    Declaration
    public TensorShape(int d4, int d3, int d2, int d1, int d0)
    Parameters
    Type Name Description
    int d4

    Length of axis 4.

    int d3

    Length of axis 3.

    int d2

    Length of axis 2.

    int d1

    Length of axis 1.

    int d0

    Length of axis 0.

    TensorShape(int, int, int, int)

    Initializes and returns an instance of TensorShape with a rank of 4: (d3, d2, d1, d0).

    For example (6, 7, 8, 9).

    Declaration
    public TensorShape(int d3, int d2, int d1, int d0)
    Parameters
    Type Name Description
    int d3

    Length of axis 3.

    int d2

    Length of axis 2.

    int d1

    Length of axis 1.

    int d0

    Length of axis 0.

    TensorShape(int, int, int)

    Initializes and returns an instance of TensorShape with a rank of 3: (d2, d1, d0).

    For example (7, 8, 9).

    Declaration
    public TensorShape(int d2, int d1, int d0)
    Parameters
    Type Name Description
    int d2

    Length of axis 2.

    int d1

    Length of axis 1.

    int d0

    Length of axis 0.

    TensorShape(int, int)

    Initializes and returns an instance of TensorShape with a rank of 2: (d1, d0).

    For example (8, 9).

    Declaration
    public TensorShape(int d1, int d0)
    Parameters
    Type Name Description
    int d1

    Length of axis 1.

    int d0

    Length of axis 0.

    TensorShape(int)

    Initializes and returns an instance of TensorShape with a rank of 1: (d0).

    For example (9).

    Declaration
    public TensorShape(int d0)
    Parameters
    Type Name Description
    int d0

    Length of axis 0.

    TensorShape(ReadOnlySpan<int>)

    Initializes and returns an instance of TensorShape with a given shape. For example: TensorShape(new [] {3, 4, 5, 6}) returns a tensor with a shape of (3, 4, 5, 6).

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

    The shape as a span.

    TensorShape(TensorShape)

    Returns a copy of another TensorShape.

    Declaration
    public TensorShape(TensorShape shape)
    Parameters
    Type Name Description
    TensorShape shape

    The shape to copy.

    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)