Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[res] Add TFLiteRecipe for dynamic shape Quantize #14129

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions res/TensorFlowLiteRecipes/Inf_Quantize_000/test.recipe
Original file line number Diff line number Diff line change
@@ -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"
5 changes: 5 additions & 0 deletions res/TensorFlowLiteRecipes/Inf_Quantize_000/test.rule
Original file line number Diff line number Diff line change
@@ -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]