summaryrefslogtreecommitdiff
path: root/onert-micro/luci-interpreter/include/luci_interpreter/test_models/relu/FloatReLUKernel.h
diff options
context:
space:
mode:
authorHyeongseok Oh <hseok82.oh@samsung.com>2023-09-08 10:51:25 +0000
committerHyeongseok Oh <hseok82.oh@samsung.com>2023-09-08 10:51:25 +0000
commiteed258505ee1ad0f72d9e0a8a3934f2e9e7b5e79 (patch)
tree1aa860656489469003375a0f67edb1d729f7dc6b /onert-micro/luci-interpreter/include/luci_interpreter/test_models/relu/FloatReLUKernel.h
parent3a0ad354832744d138b361ffcfd21f33494beb6b (diff)
downloadnnfw-eed258505ee1ad0f72d9e0a8a3934f2e9e7b5e79.tar.gz
nnfw-eed258505ee1ad0f72d9e0a8a3934f2e9e7b5e79.tar.bz2
nnfw-eed258505ee1ad0f72d9e0a8a3934f2e9e7b5e79.zip
Diffstat (limited to 'onert-micro/luci-interpreter/include/luci_interpreter/test_models/relu/FloatReLUKernel.h')
-rw-r--r--onert-micro/luci-interpreter/include/luci_interpreter/test_models/relu/FloatReLUKernel.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/onert-micro/luci-interpreter/include/luci_interpreter/test_models/relu/FloatReLUKernel.h b/onert-micro/luci-interpreter/include/luci_interpreter/test_models/relu/FloatReLUKernel.h
new file mode 100644
index 000000000..39cbdab74
--- /dev/null
+++ b/onert-micro/luci-interpreter/include/luci_interpreter/test_models/relu/FloatReLUKernel.h
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2023 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.
+ */
+
+#ifndef LUCI_INTERPRETER_TEST_MODELS_FLOAT_RELU_KERNEL_H
+#define LUCI_INTERPRETER_TEST_MODELS_FLOAT_RELU_KERNEL_H
+
+#include "TestDataReLUBase.h"
+
+namespace luci_interpreter
+{
+namespace test_kernel
+{
+namespace relu_float
+{
+/*
+ * ReLU Kernel:
+ *
+ * Input(1, 3, 3, 2)
+ * |
+ * ReLU
+ * |
+ * Output(1, 3, 3, 2)
+ */
+const unsigned char test_kernel_model_circle[] = {
+ 0x18, 0x00, 0x00, 0x00, 0x43, 0x49, 0x52, 0x30, 0x00, 0x00, 0x0e, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x2c, 0x00, 0x00, 0x00, 0x14, 0x01, 0x00, 0x00, 0x30, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff,
+ 0xfc, 0xff, 0xff, 0xff, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x14, 0x00, 0x10, 0x00, 0x0c, 0x00,
+ 0x08, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
+ 0x48, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0a, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0xd4, 0xff, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6f, 0x66, 0x6d, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x69, 0x66, 0x6d, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0x0c, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00,
+ 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x11, 0x00, 0x00, 0x00, 0x4f, 0x4e, 0x45, 0x2d,
+ 0x74, 0x66, 0x6c, 0x69, 0x74, 0x65, 0x32, 0x63, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x00, 0x00, 0x00};
+
+const std::vector<float> input_data = {4.5651245, -1.783557, 10.147356, 1.359064, 19.900585,
+ 31.432447, 3.4538271, -3.425167, 11.351466, -2.519806,
+ -2.702178, -15.201234, 15.547801, 10.433272, 4.301023,
+ 5.4106083, 0.14018308, -16.32785};
+const std::vector<float> reference_output_data = {
+ 4.5651245, 0.0, 10.147356, 1.359064, 19.900585, 31.432447, 3.4538271, 0.0, 11.351466,
+ 0.0, 0.0, 0.0, 15.547801, 10.433272, 4.301023, 5.4106083, 0.14018308, 0.0};
+
+} // namespace relu_float
+
+class TestDataFloatReLU : public TestDataReLUBase<float>
+{
+public:
+ TestDataFloatReLU()
+ {
+ _input_data = relu_float::input_data;
+ _reference_output_data = relu_float::reference_output_data;
+ _test_kernel_model_circle = relu_float::test_kernel_model_circle;
+ }
+
+ ~TestDataFloatReLU() override = default;
+};
+
+} // namespace test_kernel
+} // namespace luci_interpreter
+
+#endif // LUCI_INTERPRETER_TEST_MODELS_FLOAT_RELU_KERNEL_H