diff options
author | Chunseok Lee <chunseok.lee@samsung.com> | 2020-10-29 13:12:50 +0900 |
---|---|---|
committer | Chunseok Lee <chunseok.lee@samsung.com> | 2020-10-29 13:12:50 +0900 |
commit | d6b371e095d737922187a518b8faba1ef6f3a2b1 (patch) | |
tree | 9d90c09c887b5111389dbedf924f59206411cd5a /tests/nnapi/specs/V1_2/logical_not_dynamic_nnfw.mod.py | |
parent | c55f8a6db48cda9d3a78048338b7f18c4cca62b8 (diff) | |
download | nnfw-d6b371e095d737922187a518b8faba1ef6f3a2b1.tar.gz nnfw-d6b371e095d737922187a518b8faba1ef6f3a2b1.tar.bz2 nnfw-d6b371e095d737922187a518b8faba1ef6f3a2b1.zip |
Imported Upstream version 0.4upstream/0.4
Diffstat (limited to 'tests/nnapi/specs/V1_2/logical_not_dynamic_nnfw.mod.py')
-rw-r--r-- | tests/nnapi/specs/V1_2/logical_not_dynamic_nnfw.mod.py | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/tests/nnapi/specs/V1_2/logical_not_dynamic_nnfw.mod.py b/tests/nnapi/specs/V1_2/logical_not_dynamic_nnfw.mod.py deleted file mode 100644 index 95c3f8705..000000000 --- a/tests/nnapi/specs/V1_2/logical_not_dynamic_nnfw.mod.py +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2018 The Android Open Source Project -# Copyright (c) 2020 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. -# - -# refer to tanh_v1_dynamic.mod.py about the structore - -# This adds reshape as the first op in a model and -# returns output of reshape, which is dynamic tensor - -''' -Testing LogicalNot op when the input is dynamic. - - input [1, 2, 3] shape [3] (value of shape will be [1, 2, 3]) - | | - +-------------+ - | - Reshape (added by DynamicInputGenerator since it generates its output to be dynamic) - | - | dynamic tensor at compilation time but the shape will be [1, 2, 3] at execution time - | - LogicalNot - | - output (dynamic tensor, [1, 2, 3] at execution time) -''' - -import dynamic_tensor - -model = Model() - -model_input_shape = [1, 2, 3] - -dynamic_layer = dynamic_tensor.DynamicInputGenerator(model, model_input_shape, "TENSOR_BOOL8") - -test_node_input = dynamic_layer.getTestNodeInput() - -# write LOGICAL_NOT test. input is `test_input` - -# note output shape is used by expected output's shape -model_output = Output("output", "TENSOR_BOOL8", "{1, 2, 3}") - -model.Operation("LOGICAL_NOT", test_node_input).To(model_output) - -model_input_data = [True, False, True, False, True, True] -model_output_data = [False, True, False, True, False, False] - -Example({ - # use these two as input - dynamic_layer.getModelInput(): model_input_data, - dynamic_layer.getShapeInput() : model_input_shape, - - model_output: model_output_data, -}) |