-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[res/tfl_recipes] Add REGRESS_Issue_13863 (#14064)
This commit adds REGRESS_Issue_13863 tflite recipe. ONE-DCO-1.0-Signed-off-by: HanJin Choi [email protected]
- Loading branch information
1 parent
ced67ad
commit 70f84e3
Showing
5 changed files
with
105 additions
and
2 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
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
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
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,38 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import onnx | ||
import os | ||
import sys | ||
|
||
|
||
def _help_exit(cmd_name): | ||
print('Produce shape-infered ONNX file') | ||
print('Usage: {0} [onnx_in_path] [onnx_out_path]'.format(cmd_name)) | ||
print('') | ||
exit() | ||
|
||
|
||
def main(): | ||
if len(sys.argv) < 3: | ||
_help_exit(os.path.basename(sys.argv[0])) | ||
|
||
onnx.checker.check_model(sys.argv[1]) | ||
onnx.shape_inference.infer_shapes_path(sys.argv[1], sys.argv[2]) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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,31 @@ | ||
# NOTE test model for 0 in shape. | ||
# May not work in interpreter. | ||
operand { | ||
name: "ifm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 3 dim: 2 dim: 3 } | ||
} | ||
operand { | ||
name: "shape" | ||
type: INT32 | ||
shape { dim: 3 } | ||
filler { tag: "explicit" arg: "0" arg: "3" arg: "-1" } | ||
} | ||
operand { | ||
name: "ofm" | ||
type: FLOAT32 | ||
shape { dim: 1 dim: 3 dim: 6 } | ||
} | ||
operation { | ||
type: "Reshape" | ||
reshape_options { | ||
new_shape: 0 | ||
new_shape: 3 | ||
new_shape: -1 | ||
} | ||
input: "ifm" | ||
input: "shape" | ||
output: "ofm" | ||
} | ||
input: "ifm" | ||
output: "ofm" |