Class Optimizer
Definition
- Assembly:
- Tizen.MachineLearning.Train.dll
Creates a neural network optimizer.
public class Optimizer : IDisposable
- Inheritance
-
objectOptimizer
- Implements
-
System.IDisposable
Remarks
Use this class to create neural network optimizer. If not set to model, optimizer should be released using Dispose(). If set to a model, optimizer is available until model is released.
Constructors
View SourceOptimizer(NNTrainerOptimizerType)
Creates a neural network optimizer.
Declaration
public Optimizer(NNTrainerOptimizerType type)
Parameters
Type | Name | Description |
---|---|---|
NNTrainerOptimizerType | type | The nntrainer optimizer type. |
Remarks
Use this class to create neural network optimizer. If not set to model, optimizer should be released using Dispose(). If set to a model, optimizer is available until model is released.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the feature is not supported. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.InvalidOperationException | Thrown when the method failed due to the wrong pipeline description or internal error. |
Methods
View SourceDispose()
Releases any unmanaged resources used by this object.
Declaration
public void Dispose()
Remarks
Use this class to create neural network optimizer. If not set to model, optimizer should be released using Dispose(). If set to a model, optimizer is available until model is released.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the feature is not supported. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.InvalidOperationException | Thrown when the method failed due to the wrong pipeline description or internal error. |
Dispose(bool)
Releases any unmanaged resources used by this object including opened handle.
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. |
Remarks
Use this class to create neural network optimizer. If not set to model, optimizer should be released using Dispose(). If set to a model, optimizer is available until model is released.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the feature is not supported. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.InvalidOperationException | Thrown when the method failed due to the wrong pipeline description or internal error. |
~Optimizer()
Frees the neural network optimizer.
Declaration
protected ~Optimizer()
Remarks
Use this method to destroy neural network optimizer. Fails if layer is owned by a model.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the feature is not supported. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.InvalidOperationException | Thrown when the method failed due to the wrong pipeline description or internal error. |
SetProperty(params string[])
Sets the neural network optimizer property
Declaration
public void SetProperty(params string[] property)
Parameters
Type | Name | Description |
---|---|---|
string[] | property | property for optimizer. |
Remarks
Use this method to set neural network optimizer property. The input format of property must be 'key = value' format.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the feature is not supported. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.InvalidOperationException | Thrown when the method failed due to the wrong pipeline description or internal error. |