From b8fe99db5ef65e0c6d059e9ff7ebb04ce870c36d Mon Sep 17 00:00:00 2001 From: bokyeong-Lee <149753416+kyeong8139@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:52:45 +0900 Subject: [PATCH] [res] Add TFLiteRecipe for dynamic shape Quantize (#14129) This commit add TFLiteRecipe for dynamic shape Quantize. ONE-DCO-1.0-Signed-off-by: Bokyeong Lee --- .../Inf_Quantize_000/test.recipe | 21 +++++++++++++++++++ .../Inf_Quantize_000/test.rule | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 res/TensorFlowLiteRecipes/Inf_Quantize_000/test.recipe create mode 100644 res/TensorFlowLiteRecipes/Inf_Quantize_000/test.rule diff --git a/res/TensorFlowLiteRecipes/Inf_Quantize_000/test.recipe b/res/TensorFlowLiteRecipes/Inf_Quantize_000/test.recipe new file mode 100644 index 00000000000..4657669c218 --- /dev/null +++ b/res/TensorFlowLiteRecipes/Inf_Quantize_000/test.recipe @@ -0,0 +1,21 @@ +# quantize with dynamic shape +operand { + name: "ifm" + type: FLOAT32 + shape { dim: 4 dim: 1 } + shape_signature { dim: 4 dim: -1 } +} +operand { + name: "ofm" + type: UINT8 + shape { dim: 4 dim: 1 } + shape_signature { dim: 4 dim: -1 } + quant { min: 0 max: 255 scale: 1.0 zero_point: 0 } +} +operation { + type: "Quantize" + input: "ifm" + output: "ofm" +} +input: "ifm" +output: "ofm" diff --git a/res/TensorFlowLiteRecipes/Inf_Quantize_000/test.rule b/res/TensorFlowLiteRecipes/Inf_Quantize_000/test.rule new file mode 100644 index 00000000000..c6c09cda96a --- /dev/null +++ b/res/TensorFlowLiteRecipes/Inf_Quantize_000/test.rule @@ -0,0 +1,5 @@ +# To check if dynamic shape properly infered + +RULE "VERIFY_FILE_FORMAT" $(verify_file_format) '=' 1 + +RULE "RANGE_SHAPE" $(tensor_shape ofm) '=' [4,-1]