summaryrefslogtreecommitdiff
path: root/tests/nnapi/specs/V1_0/local_response_norm_float_4.mod.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nnapi/specs/V1_0/local_response_norm_float_4.mod.py')
-rw-r--r--tests/nnapi/specs/V1_0/local_response_norm_float_4.mod.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/nnapi/specs/V1_0/local_response_norm_float_4.mod.py b/tests/nnapi/specs/V1_0/local_response_norm_float_4.mod.py
new file mode 100644
index 000000000..e4d2817d9
--- /dev/null
+++ b/tests/nnapi/specs/V1_0/local_response_norm_float_4.mod.py
@@ -0,0 +1,19 @@
+model = Model()
+i1 = Input("input", "TENSOR_FLOAT32", "{1, 1, 1, 6}")
+radius = Int32Scalar("radius", 2)
+bias = Float32Scalar("bias", 9.)
+alpha = Float32Scalar("alpha", 4.)
+beta = Float32Scalar("beta", .5)
+output = Output("output", "TENSOR_FLOAT32", "{1, 1, 1, 6}")
+
+model = model.Operation("LOCAL_RESPONSE_NORMALIZATION", i1, radius, bias, alpha, beta).To(output)
+
+# Example 1. Input in operand 0,
+input0 = {i1: # input 0
+ [-1.1, .6, .7, 1.2, -.7, .1]}
+
+output0 = {output: # output 0
+ [-.26492569, .12510864, .14011213, .26726127, -.16178755, .0244266]}
+
+# Instantiate an example
+Example((input0, output0))