-
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.
[res] Add TFLiteRecipes for FullyConnected dynamic shape (#14157)
This commit adds TFLiteRecipes for FullyConnected dynamic shape. ONE-DCO-1.0-Signed-off-by: HanJin Choi [email protected]
- Loading branch information
1 parent
ad1d197
commit 49d45bf
Showing
4 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
res/TensorFlowLiteRecipes/Inf_FullyConnected_000/test.recipe
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,45 @@ | ||
operand { | ||
name: "ifm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 2 dim: 3 } | ||
shape_signature { dim: -1 dim: 2 dim: 3} | ||
} | ||
operand { | ||
name: "weight" | ||
type: FLOAT32 | ||
shape { dim: 4 dim: 3 } | ||
filler { | ||
tag: "gaussian" | ||
arg: "0.0" | ||
arg: "1.0" | ||
} | ||
} | ||
operand { | ||
name: "bias" | ||
type: FLOAT32 | ||
shape { dim: 4 } | ||
filler { | ||
tag: "gaussian" | ||
arg: "0.0" | ||
arg: "1.0" | ||
} | ||
} | ||
operand { | ||
name: "ofm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 4 } | ||
shape_signature { dim: -1 dim: 4 } | ||
} | ||
operation { | ||
type: "FullyConnected" | ||
fullyconnected_options { | ||
activation: NONE | ||
keep_num_dims: false | ||
} | ||
input: "ifm" | ||
input: "weight" | ||
input: "bias" | ||
output: "ofm" | ||
} | ||
input: "ifm" | ||
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,5 @@ | ||
# To check if dynamic dimension properly inferred | ||
|
||
RULE "VERIFY_FILE_FORMAT" $(verify_file_format) '=' 1 | ||
|
||
RULE "FC_SHAPE" $(tensor_shape ofm) '=' [-1,4] |
45 changes: 45 additions & 0 deletions
45
res/TensorFlowLiteRecipes/Inf_FullyConnected_001/test.recipe
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,45 @@ | ||
operand { | ||
name: "ifm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 2 dim: 3 } | ||
shape_signature { dim: -1 dim: 2 dim: 3} | ||
} | ||
operand { | ||
name: "weight" | ||
type: FLOAT32 | ||
shape { dim: 4 dim: 3 } | ||
filler { | ||
tag: "gaussian" | ||
arg: "0.0" | ||
arg: "1.0" | ||
} | ||
} | ||
operand { | ||
name: "bias" | ||
type: FLOAT32 | ||
shape { dim: 4 } | ||
filler { | ||
tag: "gaussian" | ||
arg: "0.0" | ||
arg: "1.0" | ||
} | ||
} | ||
operand { | ||
name: "ofm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 2 dim: 4 } | ||
shape_signature { dim: -1 dim: 2 dim: 4 } | ||
} | ||
operation { | ||
type: "FullyConnected" | ||
fullyconnected_options { | ||
activation: NONE | ||
keep_num_dims: true | ||
} | ||
input: "ifm" | ||
input: "weight" | ||
input: "bias" | ||
output: "ofm" | ||
} | ||
input: "ifm" | ||
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,5 @@ | ||
# To check if dynamic dimension properly inferred | ||
|
||
RULE "VERIFY_FILE_FORMAT" $(verify_file_format) '=' 1 | ||
|
||
RULE "FC_SHAPE" $(tensor_shape ofm) '=' [-1,2,4] |