Class Layer
Definition
- Namespace:
- Tizen.MachineLearning.Train
- Assembly:
- Tizen.MachineLearning.Train.dll
Creates a neural network layer.
public class Layer : IDisposable
- Inheritance
-
Layer
- Implements
Remarks
Use this class to create neural network layer. layer must be released using Dispose(), if not added to a model. If added to a model by AddLayer method of Model, layer is available until the model is released. so Dispose() must never be used.
Constructors
View SourceLayer(NNTrainerLayerType)
Creates a neural network layer.
Declaration
public Layer(NNTrainerLayerType type)
Parameters
| Type | Name | Description |
|---|---|---|
| NNTrainerLayerType | type | The nntrainer layer type. |
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | Thrown when the feature is not supported. |
| ArgumentException | Thrown when the method failed due to an invalid parameter. |
| 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()
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | Thrown when the feature is not supported. |
| ArgumentException | Thrown when the method failed due to an invalid parameter. |
| 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. |
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | Thrown when the feature is not supported. |
| ArgumentException | Thrown when the method failed due to an invalid parameter. |
| InvalidOperationException | Thrown when the method failed due to the wrong pipeline description or internal error. |
~Layer()
Frees the neural network layer.
Declaration
protected ~Layer()
Remarks
Use this method to destroy neural network layer. Fails if layer is owned by a model.
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | Thrown when the feature is not supported. |
| ArgumentException | Thrown when the method failed due to an invalid parameter. |
| InvalidOperationException | Thrown when the method failed due to the wrong pipeline description or internal error. |
SetProperty(params string[])
Sets the neural network layer Property.
Declaration
public void SetProperty(params string[] property)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | property | property for layer. |
Remarks
Use this method to set neural network layer Property. The input format of property must be 'key = value' format.
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | Thrown when the feature is not supported. |
| ArgumentException | Thrown when the method failed due to an invalid parameter. |
| InvalidOperationException | Thrown when the method failed due to the wrong pipeline description or internal error. |