TE_CHECK_OBJ(layer, TRAINING_ENGINE_ERROR_INVALID_PARAMETER);
- if (property.option.empty()) {
+ if (property.options.empty()) {
LOGE("invalid property.");
return TRAINING_ENGINE_ERROR_INVALID_PARAMETER;
}
- LOGI("layer option : %s", property.option.c_str());
+ LOGI("layer property size : %zu", property.options.size());
- int ret = ml_train_layer_set_property(static_cast<ml_train_layer_h>(layer->layer_handle),
- property.option.c_str(), NULL);
- if (ret != ML_ERROR_NONE) {
- LOGE("Failed to set a layer property.");
- return TRAINING_ENGINE_ERROR_INVALID_OPERATION;
+ for (auto opt : property.options) {
+ LOGI("Set %s property", opt.c_str());
+
+ int ret = ml_train_layer_set_property(static_cast<ml_train_layer_h>(layer->layer_handle),
+ opt.c_str(), NULL);
+ if (ret != ML_ERROR_NONE) {
+ LOGE("Failed to set a layer property.");
+ return TRAINING_ENGINE_ERROR_INVALID_OPERATION;
+ }
}
LOGI("LEAVE");