/// <summary>
/// Stochastic Gradient Descent Optimizer
/// </summary>
- Sgd = 1,
+ SGD = 1,
/// <summary>
/// Unknown Optimizer
/// </summary>
{
// Destroy dataset.
NNTrainerError ret = Interop.Dataset.Destroy(handle);
- NNTrainer.CheckException(ret, "Failed to destroy dataset instance");
- Log.Info(NNTrainer.Tag, "Destroy Dataset");
+ if (ret != NNTrainerError.None)
+ Log.Error(NNTrainer.Tag, "Failed to destroy Dataset instance");
handle = IntPtr.Zero;
}
{
// Destroy the neural network layer.
NNTrainerError ret = Interop.Layer.Destroy(handle);
- NNTrainer.CheckException(ret, "Failed to destroy layer instance");
+ if (ret != NNTrainerError.None)
+ Log.Error(NNTrainer.Tag, "Failed to destroy Layer instance");
handle = IntPtr.Zero;
}
{
// Destroy the neural network model.
NNTrainerError ret = Interop.Model.Destroy(handle);
- NNTrainer.CheckException(ret, "Failed to destroy model instance");
-
+ if (ret != NNTrainerError.None)
+ Log.Error(NNTrainer.Tag, "Failed to destroy Model instance");
handle = IntPtr.Zero;
}
disposed = true;
{
// Destroy optimizer.
NNTrainerError ret = Interop.Optimizer.Destroy(handle);
- NNTrainer.CheckException(ret, "Failed to destroy optimizer instance");
+ if (ret != NNTrainerError.None)
+ Log.Error(NNTrainer.Tag, "Failed to destroy Optimizer instance");
handle = IntPtr.Zero;
}