Class TensorsData

Definition

Namespace:
Tizen.MachineLearning.Inference
Assembly:
Tizen.MachineLearning.Inference.dll
API Level:
6

The TensorsData class sets and gets the buffer data for each Tensor.

C#
Copy
public class TensorsData : IDisposable
Inheritance
System.Object
TensorsData
Implements
System.IDisposable

Properties

View Source

Count

Gets the number of Tensor in TensorsData class

Declaration
C#
Copy
public int Count { get; }
Property Value
Type Description
Int32
Exceptions
Type Condition
System.NotSupportedException

Thrown when the feature is not supported.

API Level: 6
Feature: http://tizen.org/feature/machine_learning.inference
View Source

TensorsInfo

Gets the tensors information.

Declaration
C#
Copy
public TensorsInfo TensorsInfo { get; }
Property Value
Type Description
TensorsInfo

The TensorsInfo instance

Exceptions
Type Condition
System.NotSupportedException

Thrown when the feature is not supported.

API Level: 8
Feature: http://tizen.org/feature/machine_learning.inference

Methods

View Source

Allocate(TensorsInfo)

Allocates a new TensorsData instance with the given tensors information.

Declaration
C#
Copy
public static TensorsData Allocate(TensorsInfo info)
Parameters
Type Name Description
TensorsInfo info

TensorsInfo object which has Tensor information

Returns
Type Description
TensorsData

The TensorsInfo instance

Exceptions
Type Condition
System.ArgumentException

Thrown when the method failed due to an invalid parameter.

System.NotSupportedException

Thrown when the feature is not supported.

API Level: 8
View Source

Dispose()

Releases any unmanaged resources used by this object.

Declaration
C#
Copy
public void Dispose()
API Level: 6
View Source

Dispose(Boolean)

Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing

If true, disposes any disposable objects. If false, does not dispose disposable objects.

View Source

Finalize()

Destructor of the TensorsData instance

Declaration
C#
Copy
protected void Finalize()
API Level: 6
View Source

GetTensorData(Int32)

Gets a tensor data to given index.

Declaration
C#
Copy
public byte[] GetTensorData(int index)
Parameters
Type Name Description
Int32 index

The index of the tensor.

Returns
Type Description
System.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.

API Level: 6
Feature: http://tizen.org/feature/machine_learning.inference
View Source

SetTensorData(Int32, Byte[])

Sets a tensor data to given index.

Declaration
C#
Copy
public void SetTensorData(int index, byte[] buffer)
Parameters
Type Name Description
Int32 index

The index of the tensor.

System.Byte[] buffer

Raw tensor data to be set.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the feature is not supported.

System.ArgumentException

Thrown when the data is not valid.

API Level: 6
Feature: http://tizen.org/feature/machine_learning.inference

Implements

System.IDisposable