Skip to content

Commit

Permalink
[recipe] Add recipe for ExpandDims (#14220)
Browse files Browse the repository at this point in the history
This commit adds recipe for ExpandDims which has constant operand with shape.

ONE-DCO-1.0-Signed-off-by: Dayoung Lee <[email protected]>
  • Loading branch information
dayo09 authored Oct 16, 2024
1 parent c5fd64a commit 136ddde
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
30 changes: 30 additions & 0 deletions res/TensorFlowLiteRecipes/ExpandDims_005/test.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
operand {
name: "ifm1"
type: FLOAT32
shape { dim: 3 dim: 3 }
}

operand {
name: "ifm2"
type: INT32
shape { dim: 1 }
filler {
tag: "constant"
arg: "1"
}
}

operand {
name: "ofm"
type: FLOAT32
shape { dim: 3 dim: 1 dim: 3 }
}

operation {
type: "ExpandDims"
input: "ifm1"
input: "ifm2"
output: "ofm"
}
input: "ifm1"
output: "ofm"
6 changes: 6 additions & 0 deletions res/TensorFlowLiteRecipes/ExpandDims_005/test.rule
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# To check if ExpandDims is transformed to Reshape.

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

RULE "RESHAPE_COUNT" $(op_count RESHAPE) '=' 1
RULE "NO_EXPAND_DIMS" $(op_count EXPAND_DIMS) '=' 0

0 comments on commit 136ddde

Please sign in to comment.