Class Tensor
Represents data in a multidimensional array-like structure.
Implements
Inherited Members
Namespace: Unity.Sentis
Assembly: solution.dll
Syntax
public abstract class Tensor : IDisposable
Constructors
| Name | Description |
|---|---|
| Tensor(TensorShape, ITensorData, ITensorAllocator) | Instantiates and returns a Tensor with the specified |
Properties
| Name | Description |
|---|---|
| allocator | The allocator for the tensor. Refer to ITensorAllocator. |
| dataType | The data type of the elements of the tensor. |
| shape | The shape of the tensor, as a |
| tensorOnDevice | The device-specific internal representation of the tensor data. |
Methods
| Name | Description |
|---|---|
| AttachToDevice(ITensorData) | Associates a tensor with the block of data on a device. Sentis downloads from Make sure |
| CompleteAllPendingOperations() | Completes all scheduled tensor operations on device. |
| DeepCopy() | Returns a deep copy of the current Tensor. |
| DetachFromDevice(bool) | Synchronizes the tensor data with the data on the device, then remove the tensor from the device. |
| Dispose() | Disposes of the tensor and any associated memory. |
| ~Tensor() | Dispose of the tensor and any associated memory. |
| IsReadbackRequestDone() | Checks if asynchronous readback request it done. Returns true if async readback is successful. |
| MakeReadable() | Blocking call to make tensor data read/write. Issues a blocking download of the internal data. And converts tensorData to ArrayTensorData |
| MakeReadableAsync() | Non blocking call to make tensor data read/write. Issues a non blocking download of the internal data. And converts tensorData to ArrayTensorData |
| ReadbackRequest(Action<bool>) | Schedules asynchronous download of the internal data. |
| ReadbackRequestAsync() | Schedules asynchronous download task of the internal data. Boolean indicates if async readback is successful. |
| ShallowCopy() | Returns a shallow copy of the current |
| ShallowReshape(TensorShape) | Returns a shallow copy of the
|
| TakeOwnership() | Removes system references to the tensor. The caller assumes ownership. |
| ToString() | Returns a string that represents the |
| UploadToDevice(ITensorData) | Uploads the tensor data to the destination data location on device. |