docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor ComputeTensorData

    ComputeTensorData(TensorShape, bool)

    Initializes and returns an instance of ComputeTensorData, and allocates storage for a tensor with the shape of shape.

    Declaration
    public ComputeTensorData(TensorShape shape, bool clearOnInit = false)
    Parameters
    Type Name Description
    TensorShape shape

    The shape of the tensor data to allocate.

    bool clearOnInit

    Whether to zero the data on allocation. The default value is false.

    ComputeTensorData(TensorShape, NativeTensorArray, int)

    Initializes and returns an instance of ComputeTensorData with given data and offset.

    Declaration
    public ComputeTensorData(TensorShape shape, NativeTensorArray array, int offset = 0)
    Parameters
    Type Name Description
    TensorShape shape

    The shape of the tensor data.

    NativeTensorArray array

    The allocated data to use as backing data.

    int offset

    The integer offset from the start of the backing array. The default value is 0.

    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)