-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[recipe] Add recipe for ExpandDims (#14220)
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
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |