Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / tests / nnapi / specs / Ex / cos_ex_4D_float_nnfw.mod.py
1 # model
2 model = Model()
3
4 i1 = Input("op1", "TENSOR_FLOAT32", "{2, 1, 2, 2}")
5 i3 = Output("op3", "TENSOR_FLOAT32", "{2, 1, 2, 2}")
6 model = model.Operation("COS_EX", i1).To(i3)
7
8 # Example 1. Input in operand 0,
9 input0 = {i1: # input 0
10           [12.0, 36.1, 2.0, 90, 1.0, 0.012, 0.001, 5]}
11
12 output0 = {i3: # output 0
13            [0.843853959, -0.028311733, -0.416146837, -0.448073616, 
14                0.540302306, 0.999928001, 0.999999500, 0.283662185]}
15
16 # Instantiate an example
17 Example((input0, output0))