Add the use of user desired input and output layers
authorInki Dae <inki.dae@samsung.com>
Tue, 18 Feb 2020 01:54:41 +0000 (10:54 +0900)
committerInki Dae <inki.dae@samsung.com>
Tue, 14 Apr 2020 00:42:53 +0000 (09:42 +0900)
Change-Id: I140ad98452f0ab2c3878aa05a0927f4553639d6e
Signed-off-by: Inki Dae <inki.dae@samsung.com>
common/inference_engine_common_impl.cpp
include/inference_engine_common.h
include/inference_engine_common_impl.h
include/inference_engine_type.h

index 4f3c8c71d538fd140d5b347009e1e2cb891f4110..4535adbc295f48a655ae273bfc1a6bfd55eca8f4 100755 (executable)
@@ -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)
index 40bb0aa8da67622844b4fa463877f46e183f377b..82272e066e2281ee492d130f3975fc4f831ddb97 100755 (executable)
@@ -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.
index 0d9be145a5e6d5afa9612c5736d3da4a6ba18679..46de0de8dd50ed151f604e286ed2414d4a2b2bdb 100755 (executable)
@@ -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.
index be6f6b515fc6b1c5980c45cea98f1c2d9b0df8b0..ab6a472aac5a35fadad264b73cac7f986fa846c7 100644 (file)
@@ -161,7 +161,7 @@ typedef struct _inference_engine_tensor_buffer {
  * @since_tizen 6.0
  */
 typedef struct _inference_engine_tensor_info {
-    std::vector<int> shape; /** a tensor shape. */
+    std::vector<int> 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<inference_engine_tensor_info> tensor_infos;
+    std::vector<std::string> layer_names; /**< names of layers. */
+    std::vector<inference_engine_tensor_info> tensor_infos; /**< information of tensors. */
     // TODO.
 } inference_engine_layer_property;