/* int ml_train_layer_destroy(ml_train_layer_h layer) */
[DllImport(Libraries.Nntrainer, EntryPoint = "ml_train_layer_destroy")]
public static extern NNTrainerError Destroy(IntPtr layerHandle);
+
+ /* int ml_train_layer_set_property_with_single_param(ml_train_layer_h layer, const char *single_param) */
+ [DllImport(Libraries.Nntrainer, EntryPoint = "ml_train_layer_set_property_with_single_param")]
+ public static extern NNTrainerError SetProperty(IntPtr layerHandle, string propertyParams);
}
}
\ No newline at end of file
/* int ml_train_model_get_summary(ml_train_model_h model, ml_train_summary_type_e verbosity, char **summary) */
[DllImport(Libraries.Nntrainer, EntryPoint = "ml_train_model_get_summary")]
- public static extern NNTrainerError GetSummaryUtil(IntPtr modelHandle, NNTrainerSummaryType verbosity, out string summary);
+ public static extern NNTrainerError GetSummary(IntPtr modelHandle, NNTrainerSummaryType verbosity, out string summary);
/* int ml_train_model_save(ml_train_model_h model, const char *file_path, ml_train_model_format_e format) */
[DllImport(Libraries.Nntrainer, EntryPoint = "ml_train_model_save")]
}
disposed = true;
}
+
+ /// <summary>
+ /// Sets the neural network layer Property.
+ /// </summary>
+ /// <remarks>
+ /// Use this function to set neural network layer Property.
+ /// </remarks>
+ /// <param name="property">property for layer.</param>
+ /// <since_tizen> 10 </since_tizen>
+ public void SetProperty(params string[] property)
+ {
+ string propertyParams = null;
+
+ if (property.Length > 0) {
+ propertyParams = string.Join("|", property);
+ Log.Info(NNTrainer.Tag, "Set property:"+ propertyParams);
+ }
+
+ NNTrainerError ret = Interop.Layer.SetProperty(handle, propertyParams);
+ NNTrainer.CheckException(ret, "Failed to set property");
+ }
}
}
{
string compileParams = null;
- if (hyperparameter != null) {
+ if (hyperparameter.Length > 0) {
compileParams = string.Join("|", hyperparameter);
Log.Info(NNTrainer.Tag, "Compile hyperparameter:"+ compileParams);
}
{
string runParams = null;
- if (hyperparameter != null) {
+ if (hyperparameter.Length > 0) {
runParams = string.Join("|", hyperparameter);
Log.Info(NNTrainer.Tag, "Run hyperparameter:"+ runParams);
}
/// <param name="verbosity">Verbose level of the summary.</param>
/// <param name="retSummary">On return, a string value. The summary of the current model. Avoid logic to parse and exploit summary if possible.</param>
/// <since_tizen> 10 </since_tizen>
- public void GetSummaryUtil(NNTrainerSummaryType verbosity, out string retSummary)
+ public void GetSummary(NNTrainerSummaryType verbosity, out string retSummary)
{
- NNTrainerError ret = Interop.Model.GetSummaryUtil(handle, verbosity, out string summary);
+ NNTrainerError ret = Interop.Model.GetSummary(handle, verbosity, out string summary);
NNTrainer.CheckException(ret, "Failed to get summary");
retSummary = summary;