Class SingleShot
Definition
- Namespace:
- Tizen.MachineLearning.Inference
- Assembly:
- Tizen.MachineLearning.Inference.dll
- API Level:
- 6
The SingleShot class loads a Machine Learning model and make inferences from input data.
C#Copypublic class SingleShot : IDisposable
- Inheritance
-
System.ObjectSingleShot
- Implements
-
System.IDisposable
Constructors
SingleShot(String, TensorsInfo, TensorsInfo)
Loads the neural network model and configures runtime environment
Declaration
C#Copypublic SingleShot(string modelAbsPath, TensorsInfo inTensorsInfo, TensorsInfo outTensorsInfo)
Parameters
Type | Name | Description |
---|---|---|
System.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. |
IOException | Thrown when constructing the pipeline is failed. |
System.NotSupportedException | Thrown when the feature is not supported. |
API Level: 6
Feature: http://tizen.org/feature/machine_learning.inference
Methods
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 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. |
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. |