docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor TensorInt

    TensorInt(TensorShape, int[])

    Initializes and returns a tensor with the specified shape and an int[] array of srcData data.

    Declaration
    public TensorInt(TensorShape shape, int[] srcData)
    Parameters
    Type Name Description
    TensorShape shape

    The shape of the tensor.

    int[] srcData

    The data elements of the tensor.

    TensorInt(TensorShape, int[], int)

    Initializes and returns a tensor with specified shape and an int[] array of srcData data. Sentis reads srcData from dataStartIndex.

    srcData.Length - dataStartIndex must be bigger than or equal to shape.length.

    Declaration
    public TensorInt(TensorShape shape, int[] srcData, int dataStartIndex = 0)
    Parameters
    Type Name Description
    TensorShape shape

    The shape of the tensor.

    int[] srcData

    The data elements of the tensor.

    int dataStartIndex

    The index of the first tensor element in the srcData array.

    TensorInt(TensorShape, NativeArray<int>, int)

    Initializes and returns a tensor with specified shape and a native int array of srcData data. Sentis reads srcData from dataStartIndex.

    srcData.Length - dataStartIndex must be bigger than or equal to shape.length.

    Declaration
    public TensorInt(TensorShape shape, NativeArray<int> srcData, int dataStartIndex = 0)
    Parameters
    Type Name Description
    TensorShape shape

    The shape of the tensor.

    NativeArray<int> srcData

    The data elements of the tensor.

    int dataStartIndex

    The index of the first tensor element in the srcData native array.

    TensorInt(int)

    Initializes and returns a scalar tensor with the value of srcData.

    Declaration
    public TensorInt(int srcData)
    Parameters
    Type Name Description
    int srcData

    The data element of the tensor.

    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)