Skip to content

Commit

Permalink
[res] Add TFLiteRecipe for dynamic shape pad
Browse files Browse the repository at this point in the history
This commit adds TFLiteRecipe for dynamic shape pad.

ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]
  • Loading branch information
icodo98 committed Sep 27, 2024
1 parent dffeb51 commit 652dfce
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
33 changes: 33 additions & 0 deletions res/TensorFlowLiteRecipes/Inf_Pad_000/test.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# padding with dynamic shape, others same as Pad_000
operand {
name: "ifm"
type: FLOAT32
shape { dim: 1 dim: 1 dim: 3 dim: 2 }
shape_signature { dim: 1 dim: -1 dim: 3 dim: 2 }
}
operand {
name: "padding"
type: INT64
shape { dim: 4 dim: 2 }
filler {
tag: "explicit"
arg: "0" arg: "0"
arg: "1" arg: "1"
arg: "2" arg: "2"
arg: "0" arg: "0"
}
}
operand {
name: "ofm"
type: FLOAT32
shape { dim: 1 dim: 1 dim: 7 dim: 2 }
shape_signature { dim: 1 dim: -1 dim: 7 dim: 2 }
}
operation {
type: "Pad"
input: "ifm"
input: "padding"
output: "ofm"
}
input: "ifm"
output: "ofm"
5 changes: 5 additions & 0 deletions res/TensorFlowLiteRecipes/Inf_Pad_000/test.rule
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# To check if dynamic dimension properly inferred

RULE "VERIFY_FILE_FORMAT" $(verify_file_format) '=' 1

RULE "PAD_SHAPE" $(tensor_shape ofm) '=' [1,-1,7,2]

0 comments on commit 652dfce

Please sign in to comment.