Constructor ArrayTensorData
ArrayTensorData(TensorShape, bool)
Initializes and returns an instance of ArrayTensorData, and allocates storage for a tensor with the shape of shape.
Declaration
public ArrayTensorData(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 |
ArrayTensorData(TensorShape, NativeTensorArray, int, bool)
Initializes and returns an instance of ArrayTensorData with given storage and offset.
Declaration
public ArrayTensorData(TensorShape shape, NativeTensorArray data, int offset = 0, bool clearOnInit = false)
Parameters
| Type | Name | Description |
|---|---|---|
| TensorShape | shape | The shape of the tensor data. |
| NativeTensorArray | data | 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. |
| bool | clearOnInit | Whether to zero the data on instantiation. The default value is |
ArrayTensorData(TensorShape, Array, bool)
Initializes and returns an instance of ArrayTensorData with a given array of data.
Declaration
public ArrayTensorData(TensorShape shape, Array data, bool clearOnInit = false)
Parameters
| Type | Name | Description |
|---|---|---|
| TensorShape | shape | The shape of the tensor data. |
| Array | data | The data to use as backing data. |
| bool | clearOnInit | Whether to zero the data on instantiation. The default value is |