2 # Copyright (C) 2018 The Android Open Source Project
3 # Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
23 model_input_shape = [4, 3, 2]
25 axis = Input("input1", "TENSOR_INT32", "{1}")
27 output0 = Output("output0", "TENSOR_FLOAT32", "{4, 3, 2}")
30 dynamic_layer = dynamic_tensor.DynamicInputGenerator(model, model_input_shape, "TENSOR_FLOAT32")
32 test_node_input = dynamic_layer.getTestNodeInput()
34 model.Operation("REVERSE_EX", test_node_input, axis).To([output0])
36 model_input_data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
37 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
39 output_0_data = [5, 6, 3, 4, 1, 2, 11, 12, 9, 10, 7, 8,
40 17, 18, 15, 16, 13, 14, 23, 24, 21, 22, 19, 20]
44 dynamic_layer.getModelInput() : model_input_data,
45 dynamic_layer.getShapeInput() : model_input_shape,
49 output0: output_0_data,