ONE - On-device Neural Engine
Loading...
Searching...
No Matches
FloatZerosLikeKernel.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 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_ZEROS_LIKE_KERNEL_H
18#define ONERT_MICRO_TEST_MODELS_FLOAT_ZEROS_LIKE_KERNEL_H
19
21
22namespace onert_micro
23{
24namespace test_model
25{
26namespace zeros_like_float
27{
28/*
29 * ZerosLike Kernel:
30 *
31 * Input(1, 8, 8, 4)
32 * |
33 * ZerosLike
34 * |
35 * Output(1, 8, 8, 4)
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 0x28, 0x00, 0x00, 0x00, 0x24, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
41 0x14, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x8c, 0xff, 0xff, 0xff,
42 0x90, 0xff, 0xff, 0xff, 0x94, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
43 0x00, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x14, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x04, 0x00,
44 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,
45 0x60, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e,
46 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00,
47 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x08, 0x00, 0x0e, 0x00, 0x00, 0x00,
48 0x00, 0x00, 0x00, 0x43, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
49 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
50 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
51 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
52 0x04, 0x00, 0x00, 0x00, 0xd4, 0xff, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
53 0x0c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6f, 0x66, 0x6d, 0x00, 0x04, 0x00, 0x00, 0x00,
54 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
55 0x0c, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00,
56 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
57 0x69, 0x66, 0x6d, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
58 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
59 0x0c, 0x00, 0x0c, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00,
60 0x5d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x11, 0x00, 0x00, 0x00, 0x4f, 0x4e, 0x45, 0x2d,
61 0x74, 0x66, 0x6c, 0x69, 0x74, 0x65, 0x32, 0x63, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x00, 0x00, 0x00};
62
63const std::vector<float> input_data = {
64 1.7787564, 13.526123, 14.194824, 10.215213, 6.5696063, 0.32476053, 5.172812, 11.58254,
65 1.2253664, 6.448969, 4.818403, 5.173219, 5.2025485, 8.907726, 4.8675847, 9.658814,
66 5.3619566, 3.8089416, 2.4607596, 9.53005, 4.313822, 4.409469, 2.5364797, 13.099183,
67 5.745605, 11.5468855, 3.1745827, 11.864263, 3.6772785, 9.995764, 7.7593145, 7.6526804,
68 6.112807, 5.48038, 3.7828858, 7.090309, 5.489285, 2.3067036, 14.311049, 13.833762,
69 12.089778, 12.386912, 11.303204, 14.277523, 11.803083, 6.6585464, 2.7015727, 14.788383,
70 12.607371, 9.1037035, 14.309183, 11.836715, 2.358639, 3.6424284, 7.4297013, 2.298006,
71 12.073541, 4.2871723, 6.96936, 2.777173, 10.598123, 9.057254, 8.749597, 12.798924,
72 5.3618493, 6.4888196, 0.8675639, 1.0193392, 8.820988, 8.71598, 2.3144798, 6.4430947,
73 9.2404785, 14.713503, 7.9737625, 14.192959, 7.2330065, 1.4928365, 13.074282, 8.062984,
74 2.477071, 1.0175642, 8.497505, 4.331551, 4.4471636, 4.101821, 3.2111287, 7.7156234,
75 9.624156, 7.312001, 14.068299, 3.1033943, 5.766773, 0.14364493, 6.7649574, 14.875702,
76 8.498291, 4.2673383, 12.381352, 5.6543016, 10.172108, 13.540233, 5.5367966, 8.703237,
77 2.8888083, 12.95428, 4.149702, 14.5791, 8.460501, 10.52306, 4.754477, 12.637787,
78 4.265919, 12.244986, 7.511471, 6.9737573, 10.677587, 12.313292, 1.9264419, 14.983515,
79 12.197964, 9.873872, 2.853508, 8.904088, 11.980053, 12.680642, 14.272312, 6.467417,
80 6.7574244, 11.432324, 8.442689, 11.535555, 7.413639, 12.879065, 1.3870583, 11.108672,
81 7.102633, 12.837867, 13.467441, 14.339677, 13.595035, 9.505788, 3.3638806, 7.9711785,
82 5.9886556, 9.487856, 13.933081, 12.057823, 12.9993105, 4.722163, 0.95726097, 10.479345,
83 1.531544, 10.66464, 6.4508915, 6.547761, 10.806489, 12.947966, 14.944827, 6.6092124,
84 13.971567, 4.359874, 13.894613, 10.704036, 6.450422, 5.7402406, 1.3440402, 10.858341,
85 11.920715, 8.983641, 3.759923, 7.9603405, 13.422217, 14.646154, 11.382288, 11.591205,
86 13.14068, 14.599585, 14.313996, 11.4980135, 11.228389, 2.3352063, 0.26753145, 12.255293,
87 2.3492632, 13.274841, 3.6202207, 0.5872089, 10.600124, 13.302039, 13.432229, 2.3966095,
88 14.03712, 5.0836163, 13.029095, 8.314608, 13.133893, 2.7634015, 4.304786, 7.431993,
89 2.6958325, 8.048784, 12.457581, 11.330703, 12.303246, 7.140373, 11.876143, 0.8814453,
90 6.90046, 10.70249, 12.065882, 12.265273, 9.0821085, 10.044222, 0.72431827, 14.340595,
91 14.978852, 6.455387, 0.76369095, 2.1449616, 6.9374723, 11.827915, 1.2242815, 9.756281,
92 8.263249, 4.867419, 2.4891205, 2.9900494, 6.7416954, 6.3161993, 5.616863, 13.482001,
93 12.058539, 8.699999, 12.006457, 10.08873, 12.14564, 4.7759733, 10.889552, 6.1692514,
94 5.365749, 9.306172, 9.769926, 9.491741, 1.2538989, 2.4900718, 0.6668129, 9.1738,
95 13.009842, 11.950754, 6.241434, 5.1960526, 7.8892946, 7.969435, 0.75331974, 8.6089735};
96
97const std::vector<float> reference_output_data = {
98 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
99 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
100 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
101 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
102 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
103 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
104 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
105 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
106 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.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