Class SingleShot

Definition

Namespace:
Tizen.MachineLearning.Inference
Assembly:
Tizen.MachineLearning.Inference.dll

The SingleShot class loads a Machine Learning model and make inferences from input data.

C#
Copy
public class SingleShot : IDisposable
Inheritance
object
SingleShot
Implements
System.IDisposable

Constructors

View Source

SingleShot(string, TensorsInfo, TensorsInfo)

Loads the neural network model and configures runtime environment

Declaration
C#
Copy
public SingleShot(string modelAbsPath, TensorsInfo inTensorsInfo, TensorsInfo outTensorsInfo)
Parameters
Type Name Description
string modelAbsPath

Absolute path to the neural network model file.

TensorsInfo inTensorsInfo

Input TensorsInfo object

TensorsInfo outTensorsInfo

Output TensorsInfo object for inference result

Exceptions
Type Condition
System.ArgumentException

Thrown when the method failed due to an invalid parameter.

System.IO.IOException

Thrown when constructing the pipeline is failed.

System.NotSupportedException

Thrown when the feature is not supported.

Methods

View Source

Dispose()

Releases any unmanaged resources used by this object.

Declaration
C#
Copy
public void Dispose()
View Source

Dispose(bool)

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
bool disposing

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

View Source

~SingleShot()

Destructor of the Single instance.

Declaration
C#
Copy
protected ~SingleShot()
View Source

Invoke(TensorsData)

Invokes the model with the given input data.

Declaration
C#
Copy
public TensorsData Invoke(TensorsData inTensorsData)
Parameters
Type Name Description
TensorsData inTensorsData

The input data to be inferred.

Returns
Type Description
TensorsData

TensorsData instance which contains the inferred result.

Exceptions
Type Condition
System.ArgumentException

Thrown when the method failed due to an invalid parameter.

System.IO.IOException

Thrown when failed to push an input data into source element.

System.TimeoutException

Thrown when failed to get the result from sink element.

System.NotSupportedException

Thrown when the feature is not supported.

Implements

System.IDisposable