Class TensorFloat
Represents data in a multidimensional array-like structure of floats.
Implements
Inherited Members
Namespace: Unity.Sentis
Assembly: solution.dll
Syntax
public class TensorFloat : Tensor, IDisposable
Constructors
| Name | Description |
|---|---|
| TensorFloat(float) | Initializes and returns a scalar tensor with the value of |
| TensorFloat(TensorShape, float[]) | Initializes and returns a tensor with the specified |
| TensorFloat(TensorShape, float[], int) | Initializes and returns a tensor with specified
|
| TensorFloat(TensorShape, NativeArray<float>, int) | Initializes and returns a tensor with specified
|
Properties
| Name | Description |
|---|---|
| this[int] | Returns the tensor element at offset |
| this[int, int] | Returns the tensor element at offset |
| this[int, int, int] | Returns the tensor element at offset |
| this[int, int, int, int] | Returns the tensor element at offset |
| this[int, int, int, int, int] | Returns the tensor element at offset |
| this[int, int, int, int, int, int] | Returns the tensor element at offset |
| this[int, int, int, int, int, int, int] | Returns the tensor element at offset |
| this[int, int, int, int, int, int, int, int] | Returns the tensor element at offset |
| dataType | The data type of the elements of the tensor. |
Methods
| Name | Description |
|---|---|
| DeepCopy() | Returns a deep copy of the current Tensor. |
| ShallowReshape(TensorShape) | Returns a shallow copy of the
|
| ToReadOnlyArray() | Returns a copy of linear memory representation of the data in this tensor. the returned array is a deepcopy of the tensor, the caller of this methods is now responsible for it. If you modify the contents of the returned array, it will not modify the underlying tensor |
| ToReadOnlySpan() | Returns a ReadOnlySpan on the linear memory representation of the data in this tensor. |
| UploadToDevice(ITensorData) | Uploads the tensor data to the destination data location on device. |
| Zeros(TensorShape) | Initializes and returns a tensor with the specified |