1 /*
2  * Copyright (c) 2017 Arm Limited.
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #ifndef ARM_COMPUTE_TEST_GOOGLENETINCEPTIONV4_ACTIVATION_LAYER_DATASET
25 #define ARM_COMPUTE_TEST_GOOGLENETINCEPTIONV4_ACTIVATION_LAYER_DATASET
26 
27 #include "tests/framework/datasets/Datasets.h"
28 
29 #include "utils/TypePrinter.h"
30 
31 #include "arm_compute/core/TensorShape.h"
32 #include "arm_compute/core/Types.h"
33 
34 namespace arm_compute
35 {
36 namespace test
37 {
38 namespace datasets
39 {
40 class GoogLeNetInceptionV4ActivationLayerDataset final : public
41     framework::dataset::CartesianProductDataset<framework::dataset::InitializerListDataset<TensorShape>, framework::dataset::SingletonDataset<ActivationLayerInfo>>
42 {
43 public:
GoogLeNetInceptionV4ActivationLayerDataset()44     GoogLeNetInceptionV4ActivationLayerDataset()
45         : CartesianProductDataset
46     {
47         framework::dataset::make("Shape", { // conv1_3x3_s2_relu
48             TensorShape(149U, 149U, 32U),
49             // conv2_3x3_s1_relu
50             TensorShape(147U, 147U, 32U),
51             // conv3_3x3_s1_relu
52             TensorShape(147U, 147U, 64U),
53             // inception_stem1_3x3_s2_relu
54             TensorShape(73U, 73U, 96U),
55             // inception_stem2_3x3_reduce_relu, inception_stem2_1x7_reduce_relu, inception_stem2_1x7_relu, inception_stem2_7x1_relu
56             TensorShape(73U, 73U, 64U),
57             // inception_stem2_3x3_relu, inception_stem2_3x3_2_relu
58             TensorShape(71U, 71U, 96U),
59             // inception_stem3_3x3_s2_relu, reduction_a_3x3_2_reduce_relu
60             TensorShape(35U, 35U, 192U),
61             // inception_a1_1x1_2_relu, inception_a1_3x3_relu, inception_a1_3x3_2_relu, inception_a1_3x3_3_relu, inception_a1_1x1_relu, inception_a2_1x1_2_relu, inception_a2_3x3_relu, inception_a2_3x3_2_relu, inception_a2_3x3_3_relu, inception_a2_1x1_relu, inception_a3_1x1_2_relu, inception_a3_3x3_relu, inception_a3_3x3_2_relu, inception_a3_3x3_3_relu, inception_a3_1x1_relu, inception_a4_1x1_2_relu, inception_a4_3x3_relu, inception_a4_3x3_2_relu, inception_a4_3x3_3_relu, inception_a4_1x1_relu
62             TensorShape(35U, 35U, 96U),
63             // inception_a1_3x3_reduce_relu, inception_a1_3x3_2_reduce_relu, inception_a2_3x3_reduce_relu, inception_a2_3x3_2_reduce_relu, inception_a3_3x3_reduce_relu, inception_a3_3x3_2_reduce_relu, inception_a4_3x3_reduce_relu, inception_a4_3x3_2_reduce_relu
64             TensorShape(35U, 35U, 64U),
65             // reduction_a_3x3_relu, inception_b1_1x1_2_relu, inception_b2_1x1_2_relu, inception_b3_1x1_2_relu, inception_b4_1x1_2_relu, inception_b5_1x1_2_relu, inception_b6_1x1_2_relu, inception_b7_1x1_2_relu
66             TensorShape(17U, 17U, 384U),
67             // reduction_a_3x3_2_relu
68             TensorShape(35U, 35U, 224U),
69             // reduction_a_3x3_3_relu, inception_b1_7x1_relu, inception_b1_1x7_3_relu, inception_b2_7x1_relu, inception_b2_1x7_3_relu, inception_b3_7x1_relu, inception_b3_1x7_3_relu, inception_b4_7x1_relu, inception_b4_1x7_3_relu, inception_b5_7x1_relu, inception_b5_1x7_3_relu, inception_b6_7x1_relu, inception_b6_1x7_3_relu, inception_b7_7x1_relu, inception_b7_1x7_3_relu, reduction_b_1x7_reduce_relu, reduction_b_1x7_relu
70             TensorShape(17U, 17U, 256U),
71             // inception_b1_1x7_reduce_relu, inception_b1_7x1_2_reduce_relu, inception_b1_7x1_2_relu, inception_b2_1x7_reduce_relu, inception_b2_7x1_2_reduce_relu, inception_b2_7x1_2_relu, inception_b3_1x7_reduce_relu, inception_b3_7x1_2_reduce_relu, inception_b3_7x1_2_relu, inception_b4_1x7_reduce_relu, inception_b4_7x1_2_reduce_relu, inception_b4_7x1_2_relu, inception_b5_1x7_reduce_relu, inception_b5_7x1_2_reduce_relu, inception_b5_7x1_2_relu, inception_b6_1x7_reduce_relu, inception_b6_7x1_2_reduce_relu, inception_b6_7x1_2_relu, inception_b7_1x7_reduce_relu, inception_b7_7x1_2_reduce_relu, inception_b7_7x1_2_relu, reduction_b_3x3_reduce_relu
72             TensorShape(17U, 17U, 192U),
73             // inception_b1_1x7_relu, inception_b1_1x7_2_relu, inception_b1_7x1_3_relu, inception_b2_1x7_relu, inception_b2_1x7_2_relu, inception_b2_7x1_3_relu, inception_b3_1x7_relu, inception_b3_1x7_2_relu, inception_b3_7x1_3_relu, inception_b4_1x7_relu, inception_b4_1x7_2_relu, inception_b4_7x1_3_relu, inception_b5_1x7_relu, inception_b5_1x7_2_relu, inception_b5_7x1_3_relu, inception_b6_1x7_relu, inception_b6_1x7_2_relu, inception_b6_7x1_3_relu, inception_b7_1x7_relu, inception_b7_1x7_2_relu, inception_b7_7x1_3_relu
74             TensorShape(17U, 17U, 224U),
75             // inception_b1_1x1_relu, inception_b2_1x1_relu, inception_b3_1x1_relu, inception_b4_1x1_relu, inception_b5_1x1_relu, inception_b6_1x1_relu, inception_b7_1x1_relu
76             TensorShape(17U, 17U, 128U),
77             // reduction_b_3x3_relu
78             TensorShape(8U, 8U, 192U),
79             // reduction_b_7x1_relu
80             TensorShape(17U, 17U, 320U),
81             // reduction_b_3x3_2_relu
82             TensorShape(8U, 8U, 320U),
83             // inception_c1_1x1_2_relu, inception_c1_1x3_relu, inception_c1_3x1_relu, inception_c1_1x3_3_relu, inception_c1_3x1_3_relu, inception_c1_1x1_relu, inception_c2_1x1_2_relu, inception_c2_1x3_relu, inception_c2_3x1_relu, inception_c2_1x3_3_relu, inception_c2_3x1_3_relu, inception_c2_1x1_relu, inception_c3_1x1_2_relu, inception_c3_1x3_relu, inception_c3_3x1_relu, inception_c3_1x3_3_relu, inception_c3_3x1_3_relu, inception_c3_1x1_relu
84             TensorShape(8U, 8U, 256U),
85             // inception_c1_1x1_3_relu, inception_c1_1x1_4_relu, inception_c2_1x1_3_relu, inception_c2_1x1_4_relu, inception_c3_1x1_3_relu, inception_c3_1x1_4_relu
86             TensorShape(8U, 8U, 384U),
87             // inception_c1_3x1_2_relu, inception_c2_3x1_2_relu, inception_c3_3x1_2_relu
88             TensorShape(8U, 8U, 448U),
89             // inception_c1_1x3_2_relu, inception_c2_1x3_2_relu, inception_c3_1x3_2_relu
90             TensorShape(8U, 8U, 512U) }),
91         framework::dataset::make("Info", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))
92     }
93     {
94     }
95     GoogLeNetInceptionV4ActivationLayerDataset(GoogLeNetInceptionV4ActivationLayerDataset &&) = default;
96     ~GoogLeNetInceptionV4ActivationLayerDataset()                                             = default;
97 };
98 } // namespace datasets
99 } // namespace test
100 } // namespace arm_compute
101 #endif /* ARM_COMPUTE_TEST_GOOGLENETINCEPTIONV4_ACTIVATION_LAYER_DATASET */
102