[Version] : 0.1.0-0
[Issue type] : new feature
This api saves trained model data to a given model file.
Change-Id: Icc79b2138d5c8beecaef684e4cd540ffabd1af30
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Name: training-engine-nntrainer
Summary: Training engine NNTrainer backend
-Version: 0.0.2
-Release: 1
+Version: 0.1.0
+Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
ExclusiveArch: %{arm} aarch64
LOGI("LEAVE");
}
+ int TrainingNntrainer::SaveModel(const training_engine_model *model, const std::string& file_path)
+ {
+ int ret = ml_train_model_save(model->model_handle, file_path.c_str(), ML_TRAIN_MODEL_FORMAT_INI_WITH_BIN);
+ if (ret != ML_ERROR_NONE) {
+ LOGE("Failed to save trainig data.(%d)", ret);
+ return TRAINING_ENGINE_ERROR_INVALID_OPERATION;
+ }
+
+ return TRAINING_ENGINE_ERROR_NONE;
+ }
+
unique_ptr<training_engine_layer> TrainingNntrainer::CreateLayer(training_engine_layer_type_e type)
{
LOGI("ENTER");
int GetBackendCapacity(training_engine_capacity &capacity) final;
std::unique_ptr<training_engine_model> CreateModel(std::string model_config_path) final;
void DestroyModel(const training_engine_model *model) final;
+ int SaveModel(const training_engine_model *model, const std::string& file_path) final;
std::unique_ptr<training_engine_layer> CreateLayer(training_engine_layer_type_e type) final;
void DestroyLayer(const training_engine_layer *layer) final;
int SetLayerProperty(const training_engine_layer *layer, training_engine_layer_property &property) final;