Class TensorsInfo
Definition
- Namespace:
- Tizen.MachineLearning.Inference
- Assembly:
- Tizen.MachineLearning.Inference.dll
- API Level:
- 6
The TensorsInfo class manages each Tensor information such as Name, Type and Dimension.
C#Copypublic class TensorsInfo : IDisposable
- Inheritance
-
System.ObjectTensorsInfo
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic TensorsInfo()
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the feature is not supported. |
API Level: 6
Feature: http://tizen.org/feature/machine_learning.inference
Properties
Declaration
C#Copypublic int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
API Level: 6
Methods
AddTensorInfo(String, TensorType, Int32[])
Add a Tensor information to the TensorsInfo instance. Note that we support up to 16 tensors in TensorsInfo.
Declaration
C#Copypublic void AddTensorInfo(string name, TensorType type, int[] dimension)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of Tensor. |
TensorType | type | Data element type of Tensor. |
System.Int32[] | dimension | Dimension of Tensor. Note that we support up to 4th ranks. |
Exceptions
Type | Condition |
---|---|
System.IndexOutOfRangeException | Thrown when the number of Tensor already exceeds the size limits (i.e. Tensor.SlzeLimit) |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.NotSupportedException | Thrown when the feature is not supported. |
API Level: 6
Feature: http://tizen.org/feature/machine_learning.inference
AddTensorInfo(TensorType, Int32[])
Add a Tensor information to the TensorsInfo instance. Note that we support up to 16 tensors in TensorsInfo.
Declaration
C#Copypublic void AddTensorInfo(TensorType type, int[] dimension)
Parameters
Type | Name | Description |
---|---|---|
TensorType | type | Data element type of Tensor. |
System.Int32[] | dimension | Dimension of Tensor. Note that we support up to 4th ranks. |
Exceptions
Type | Condition |
---|---|
System.IndexOutOfRangeException | Thrown when the number of Tensor already exceeds the size limits (i.e. Tensor.SlzeLimit) |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.NotSupportedException | Thrown when the feature is not supported. |
API Level: 6
Feature: http://tizen.org/feature/machine_learning.inference
Declaration
C#Copypublic void Dispose()
API Level: 6
Dispose(Boolean)
Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | If true, disposes any disposable objects. If false, does not dispose disposable objects. |
Declaration
C#Copyprotected void Finalize()
API Level: 6
Declaration
C#Copypublic int[] GetDimension(int idx)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | The index of the tensor. |
Returns
Type | Description |
---|---|
System.Int32[] | The tensor dimension. |
Exceptions
Type | Condition |
---|---|
System.IndexOutOfRangeException | Thrown when the index is greater than the number of Tensor. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.NotSupportedException | Thrown when the feature is not supported. |
API Level: 6
Declaration
C#Copypublic string GetTensorName(int idx)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | The index of the tensor. |
Returns
Type | Description |
---|---|
System.String | The tensor name. |
Exceptions
Type | Condition |
---|---|
System.IndexOutOfRangeException | Thrown when the index is greater than the number of Tensor. |
System.NotSupportedException | Thrown when the feature is not supported. |
API Level: 6
Declaration
C#Copypublic TensorsData GetTensorsData()
Returns
Type | Description |
---|---|
TensorsData | TensorsData instance |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when the method failed due to TensorsInfo's information is invalid. |
System.NotSupportedException | Thrown when the feature is not supported. |
API Level: 6
Feature: http://tizen.org/feature/machine_learning.inference
Declaration
C#Copypublic TensorType GetTensorType(int idx)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | The index of the tensor. |
Returns
Type | Description |
---|---|
TensorType | The tensor type |
Exceptions
Type | Condition |
---|---|
System.IndexOutOfRangeException | Thrown when the index is greater than the number of Tensor. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.NotSupportedException | Thrown when the feature is not supported. |
API Level: 6
Declaration
C#Copypublic void SetDimension(int idx, int[] dimension)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | The index of the tensor to be updated. |
System.Int32[] | dimension | The tensor dimension to be set. |
Exceptions
Type | Condition |
---|---|
System.IndexOutOfRangeException | Thrown when the index is greater than the number of Tensor. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.NotSupportedException | Thrown when the feature is not supported. |
API Level: 6
Feature: http://tizen.org/feature/machine_learning.inference
Declaration
C#Copypublic void SetTensorName(int idx, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | The index of the tensor to be updated. |
System.String | name | The tensor name to be set. |
Exceptions
Type | Condition |
---|---|
System.IndexOutOfRangeException | Thrown when the index is greater than the number of Tensor. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.NotSupportedException | Thrown when the feature is not supported. |
API Level: 6
Feature: http://tizen.org/feature/machine_learning.inference
Declaration
C#Copypublic void SetTensorType(int idx, TensorType type)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | The index of the tensor to be updated. |
TensorType | type | The tensor type to be set. |
Exceptions
Type | Condition |
---|---|
System.IndexOutOfRangeException | Thrown when the index is greater than the number of Tensor. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.NotSupportedException | Thrown when the feature is not supported. |