From: Inki Dae Date: Tue, 18 Feb 2020 01:54:41 +0000 (+0900) Subject: Add the use of user desired input and output layers X-Git-Tag: submit/tizen/20200423.063253~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63261b87c3e44ca3876baba0ebec5c82ab7682b0;p=platform%2Fcore%2Fmultimedia%2Finference-engine-interface.git Add the use of user desired input and output layers Change-Id: I140ad98452f0ab2c3878aa05a0927f4553639d6e Signed-off-by: Inki Dae --- diff --git a/common/inference_engine_common_impl.cpp b/common/inference_engine_common_impl.cpp index 4f3c8c7..4535adb 100755 --- a/common/inference_engine_common_impl.cpp +++ b/common/inference_engine_common_impl.cpp @@ -185,20 +185,14 @@ int InferenceEngineCommon::GetOutputLayerProperty(inference_engine_layer_propert return engine->GetOutputLayerProperty(property); } -int InferenceEngineCommon::SetInputTensorProperty(inference_engine_layer_property &property) +int InferenceEngineCommon::SetInputLayerProperty(inference_engine_layer_property &property) { - LOGI("ENTER"); - LOGI("LEAVE"); - - return INFERENCE_ENGINE_ERROR_NONE; + return engine->SetInputLayerProperty(property); } -int InferenceEngineCommon::SetOutputTensorProperty(inference_engine_layer_property &property) +int InferenceEngineCommon::SetOutputLayerProperty(inference_engine_layer_property &property) { - LOGI("ENTER"); - LOGI("LEAVE"); - - return INFERENCE_ENGINE_ERROR_NONE; + return engine->SetOutputLayerProperty(property); } int InferenceEngineCommon::GetBackendCapacity(inference_engine_capacity *capacity) diff --git a/include/inference_engine_common.h b/include/inference_engine_common.h index 40bb0aa..82272e0 100755 --- a/include/inference_engine_common.h +++ b/include/inference_engine_common.h @@ -123,7 +123,7 @@ public: * @since_tizen 6.0 * @param[in] property User should set layer information to be used as input layer. */ - virtual int SetInputTensorProperty(inference_engine_layer_property &property) { return 0; } + virtual int SetInputLayerProperty(inference_engine_layer_property &property) = 0; /** * @brief Set output layer property information to a given backend engine. @@ -135,7 +135,7 @@ public: * @since_tizen 6.0 * @param[in] property User should set layer information to be used as output layer. */ - virtual int SetOutputTensorProperty(inference_engine_layer_property &property) { return 0; } + virtual int SetOutputLayerProperty(inference_engine_layer_property &property) = 0; /** * @brief Get capacity from a given backend engine. diff --git a/include/inference_engine_common_impl.h b/include/inference_engine_common_impl.h index 0d9be14..46de0de 100755 --- a/include/inference_engine_common_impl.h +++ b/include/inference_engine_common_impl.h @@ -169,7 +169,7 @@ public: * @since_tizen 6.0 * @param[in] property User should set layer information to be used as input layer. */ - int SetInputTensorProperty(inference_engine_layer_property &property); + int SetInputLayerProperty(inference_engine_layer_property &property); /** * @brief Set output layer property information to a given backend engine. @@ -181,7 +181,7 @@ public: * @since_tizen 6.0 * @param[in] property User should set layer information to be used as output layer. */ - int SetOutputTensorProperty(inference_engine_layer_property &property); + int SetOutputLayerProperty(inference_engine_layer_property &property); /** * @brief Get capacity from a given backend engine. diff --git a/include/inference_engine_type.h b/include/inference_engine_type.h index be6f6b5..ab6a472 100644 --- a/include/inference_engine_type.h +++ b/include/inference_engine_type.h @@ -161,7 +161,7 @@ typedef struct _inference_engine_tensor_buffer { * @since_tizen 6.0 */ typedef struct _inference_engine_tensor_info { - std::vector shape; /** a tensor shape. */ + std::vector shape; /**< a tensor shape. */ inference_tensor_shape_type_e shape_type; /**< a tensor shape of the layer. */ inference_tensor_data_type_e data_type; /**< a tensor type of the layer. */ size_t size; /** tensor buffer size. */ @@ -171,12 +171,14 @@ typedef struct _inference_engine_tensor_info { /** * @brief a layer property structure * - * This structure is used to get information to one more tensors from a backend engine. - * + * This structure is used to get/set information to one more tensors from/to a backend engine. + * - layer names of input or output layer. + * - information of tensors. * @since_tizen 6.0 */ typedef struct _inference_engine_layer_property { - std::vector tensor_infos; + std::vector layer_names; /**< names of layers. */ + std::vector tensor_infos; /**< information of tensors. */ // TODO. } inference_engine_layer_property;