ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FloatL2Pool2DKernel.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ONERT_MICRO_TEST_MODELS_FLOAT_L2POOL2D_KERNEL_H
18#define ONERT_MICRO_TEST_MODELS_FLOAT_L2POOL2D_KERNEL_H
19
21
22namespace onert_micro
23{
24namespace test_model
25{
26namespace l2pool2d_float
27{
28/*
29 * L2Pool2D Kernel:
30 *
31 * Input(1, 8, 8, 1)
32 * |
33 * L2Pool2D
34 * |
35 * Output(1, 7, 7, 1)
36 */
37const unsigned char test_kernel_model_circle[] = {
38 0x18, 0x00, 0x00, 0x00, 0x43, 0x49, 0x52, 0x30, 0x00, 0x00, 0x0e, 0x00, 0x14, 0x00, 0x00, 0x00,
39 0x0c, 0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
40 0x2c, 0x00, 0x00, 0x00, 0x48, 0x01, 0x00, 0x00, 0x64, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
41 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff,
42 0xfc, 0xff, 0xff, 0xff, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
43 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x14, 0x00, 0x10, 0x00, 0x0c, 0x00,
44 0x08, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
45 0x7c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
46 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
47 0x00, 0x00, 0x0e, 0x00, 0x16, 0x00, 0x00, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x08, 0x00,
48 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x1c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
49 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x17, 0x00, 0x10, 0x00, 0x0c, 0x00,
50 0x08, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
51 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
52 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
53 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
54 0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xd4, 0xff, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00,
55 0x02, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6f, 0x66, 0x6d, 0x00,
56 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
57 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00,
58 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
59 0x03, 0x00, 0x00, 0x00, 0x69, 0x66, 0x6d, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
60 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
61 0x10, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
62 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x11, 0x00, 0x00, 0x00,
63 0x4f, 0x4e, 0x45, 0x2d, 0x74, 0x66, 0x6c, 0x69, 0x74, 0x65, 0x32, 0x63, 0x69, 0x72, 0x63, 0x6c,
64 0x65, 0x00, 0x00, 0x00};
65
66const std::vector<float> input_data = {
67 67.38262, 67.41811, 1.2834148, -98.304276, -79.165695, 15.270965, 3.746103, -54.763,
68 -42.926304, -23.553911, -19.94737, 47.355026, 31.100943, 8.447245, -75.31512, -16.644464,
69 22.489397, -39.29673, -98.54282, -85.136086, 41.03638, -37.152763, -79.57822, -68.96887,
70 11.1106205, -10.539243, -8.441398, -52.19395, 6.378709, 9.458231, -77.18643, 99.294,
71 76.699104, 45.281494, -19.284706, 65.62093, -66.792015, -1.4548094, -82.337814, -73.516815,
72 5.0163054, 80.22257, 15.349068, 19.546398, 24.824991, 16.236868, 92.39976, 76.70845,
73 -36.775307, -12.240916, 59.4311, 60.621857, 11.79261, -64.71309, -63.46639, -33.302174,
74 -36.784237, -40.939827, 15.621524, -90.70094, 29.704996, -71.49415, 14.5302105, -17.651545};
75const std::vector<float> reference_output_data = {
76 53.57955, 37.07942, 55.465694, 69.174965, 43.413803, 38.700638, 47.33504, 33.34464, 55.244015,
77 69.998634, 55.095154, 32.02708, 58.0016, 65.26638, 23.898365, 53.472546, 70.27501, 54.07641,
78 28.25977, 58.65199, 82.015915, 45.18763, 25.517868, 43.224625, 53.693985, 33.887444, 56.632225,
79 83.667915, 59.987476, 47.6801, 36.385647, 49.41058, 36.54862, 62.415905, 81.55694, 44.618065,
80 50.875214, 44.228725, 34.68579, 36.07896, 65.22483, 69.9266, 33.657883, 37.423244, 62.605423,
81 56.839954, 50.79529, 58.17711, 37.61556};
82
83} // namespace l2pool2d_float
84
97
98} // namespace test_model
99} // namespace onert_micro
100
101#endif // ONERT_MICRO_TEST_MODELS_FLOAT_L2POOL2D_KERNEL_H
const std::vector< float > reference_output_data