/* int ml_train_dataset_add_file(ml_train_dataset_h dataset, ml_train_dataset_mode_e mode, const char *file) */
[DllImport(Libraries.Nntrainer, EntryPoint = "ml_train_dataset_add_file")]
internal static extern NNTrainerError AddFile(IntPtr datasetHandle, NNTrainerDatasetMode mode, string file);
+
+ /* int ml_train_dataset_set_property_for_mode_with_single_param(ml_train_dataset_h dataset, ml_train_dataset_mode_e mode, const char *single_param) */
+ [DllImport(Libraries.Nntrainer, EntryPoint = "ml_train_dataset_set_property_for_mode_with_single_param")]
+ internal static extern NNTrainerError SetProperty(IntPtr datasetHandle, NNTrainerDatasetMode mode, string propertyParams);
}
}
{
return handle;
}
+
+ /// <summary>
+ /// Sets the neural network dataset property.
+ /// </summary>
+ /// <remarks>
+ /// Use this function to set dataset property for a specific mode.
+ /// </remarks>
+ /// <param name="mode">The mode to set the property.</param>
+ /// <param name="property">property for dataset.</param>
+ /// <since_tizen> 10 </since_tizen>
+ public void SetProperty(NNTrainerDatasetMode mode, params string[] property)
+ {
+ string propertyParams = null;
+
+ if (property.Length > 0) {
+ propertyParams = string.Join("|", property);
+ Log.Info(NNTrainer.Tag, "Set property:"+ propertyParams);
+ }
+
+ NNTrainerError ret = Interop.Dataset.SetProperty(handle, mode, propertyParams);
+ NNTrainer.CheckException(ret, "Failed to set property");
+ }
}
}