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 |
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. |