Class TensorsData
Definition
- Assembly:
- Tizen.MachineLearning.Inference.dll
The TensorsData class sets and gets the buffer data for each Tensor.
public class TensorsData : IDisposable
- Inheritance
-
objectTensorsData
- Implements
-
System.IDisposable
Properties
View SourceCount
Gets the number of Tensor in TensorsData class
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the feature is not supported. |
Methods
View SourceDispose()
Releases any unmanaged resources used by this object.
Declaration
public void Dispose()
Dispose(bool)
Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | If true, disposes any disposable objects. If false, does not dispose disposable objects. |
~TensorsData()
Destructor of the TensorsData instance
Declaration
protected ~TensorsData()
GetTensorData(int)
Gets a tensor data to given index.
Declaration
public byte[] GetTensorData(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the tensor. |
Returns
Type | Description |
---|---|
byte[] | Raw tensor data |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.NotSupportedException | Thrown when the feature is not supported. |
SetTensorData(int, byte[])
Sets a tensor data to given index.
Declaration
public void SetTensorData(int index, byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the tensor. |
byte[] | buffer | Raw tensor data to be set. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.NotSupportedException | Thrown when the feature is not supported. |