xref: /aosp_15_r20/external/ComputeLibrary/tests/datasets/LargeConvolutionLayerDataset.h (revision c217d954acce2dbc11938adb493fc0abd69584f3)
1*c217d954SCole Faust /*
2*c217d954SCole Faust  * Copyright (c) 2017-2020 Arm Limited.
3*c217d954SCole Faust  *
4*c217d954SCole Faust  * SPDX-License-Identifier: MIT
5*c217d954SCole Faust  *
6*c217d954SCole Faust  * Permission is hereby granted, free of charge, to any person obtaining a copy
7*c217d954SCole Faust  * of this software and associated documentation files (the "Software"), to
8*c217d954SCole Faust  * deal in the Software without restriction, including without limitation the
9*c217d954SCole Faust  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10*c217d954SCole Faust  * sell copies of the Software, and to permit persons to whom the Software is
11*c217d954SCole Faust  * furnished to do so, subject to the following conditions:
12*c217d954SCole Faust  *
13*c217d954SCole Faust  * The above copyright notice and this permission notice shall be included in all
14*c217d954SCole Faust  * copies or substantial portions of the Software.
15*c217d954SCole Faust  *
16*c217d954SCole Faust  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17*c217d954SCole Faust  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18*c217d954SCole Faust  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19*c217d954SCole Faust  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20*c217d954SCole Faust  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21*c217d954SCole Faust  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22*c217d954SCole Faust  * SOFTWARE.
23*c217d954SCole Faust  */
24*c217d954SCole Faust #ifndef ARM_COMPUTE_TEST_LARGE_CONVOLUTION_LAYER_DATASET
25*c217d954SCole Faust #define ARM_COMPUTE_TEST_LARGE_CONVOLUTION_LAYER_DATASET
26*c217d954SCole Faust 
27*c217d954SCole Faust #include "tests/datasets/ConvolutionLayerDataset.h"
28*c217d954SCole Faust 
29*c217d954SCole Faust #include "utils/TypePrinter.h"
30*c217d954SCole Faust 
31*c217d954SCole Faust #include "arm_compute/core/TensorShape.h"
32*c217d954SCole Faust #include "arm_compute/core/Types.h"
33*c217d954SCole Faust 
34*c217d954SCole Faust namespace arm_compute
35*c217d954SCole Faust {
36*c217d954SCole Faust namespace test
37*c217d954SCole Faust {
38*c217d954SCole Faust namespace datasets
39*c217d954SCole Faust {
40*c217d954SCole Faust class LargeWinogradConvolutionLayer3x3Dataset final : public ConvolutionLayerDataset
41*c217d954SCole Faust {
42*c217d954SCole Faust public:
LargeWinogradConvolutionLayer3x3Dataset()43*c217d954SCole Faust     LargeWinogradConvolutionLayer3x3Dataset()
44*c217d954SCole Faust     {
45*c217d954SCole Faust         // Kernel size 3
46*c217d954SCole Faust         // Batch size 1
47*c217d954SCole Faust         add_config(TensorShape(224U, 222U, 64U), TensorShape(3U, 3U, 64U, 64U), TensorShape(64U), TensorShape(224U, 222U, 64U), PadStrideInfo(1, 1, 1, 1));
48*c217d954SCole Faust         add_config(TensorShape(112U, 113U, 64U), TensorShape(3U, 3U, 64U, 128U), TensorShape(128U), TensorShape(112U, 113U, 128U), PadStrideInfo(1, 1, 1, 1));
49*c217d954SCole Faust         add_config(TensorShape(112U, 112U, 128U), TensorShape(3U, 3U, 128U, 129U), TensorShape(129U), TensorShape(112U, 112U, 129U), PadStrideInfo(1, 1, 1, 1));
50*c217d954SCole Faust         add_config(TensorShape(53U, 56U, 125U), TensorShape(3U, 3U, 125U, 256U), TensorShape(256U), TensorShape(51U, 54U, 256U), PadStrideInfo(1, 1, 0, 0));
51*c217d954SCole Faust         add_config(TensorShape(56U, 56U, 256U), TensorShape(3U, 3U, 256U, 256U), TensorShape(256U), TensorShape(54U, 54U, 256U), PadStrideInfo(1, 1, 0, 0));
52*c217d954SCole Faust         add_config(TensorShape(28U, 28U, 257U), TensorShape(3U, 3U, 257U, 512U), TensorShape(512U), TensorShape(28U, 28U, 512U), PadStrideInfo(1, 1, 1, 1));
53*c217d954SCole Faust         add_config(TensorShape(28U, 28U, 512U), TensorShape(3U, 3U, 512U, 512U), TensorShape(512U), TensorShape(28U, 28U, 512U), PadStrideInfo(1, 1, 1, 1));
54*c217d954SCole Faust         add_config(TensorShape(14U, 14U, 512U), TensorShape(3U, 3U, 512U, 512U), TensorShape(512U), TensorShape(12U, 12U, 512U), PadStrideInfo(1, 1, 0, 0));
55*c217d954SCole Faust         // Batch size 3, 2 and 4
56*c217d954SCole Faust         add_config(TensorShape(224U, 222U, 64U, 3U), TensorShape(3U, 3U, 64U, 64U), TensorShape(64U), TensorShape(224U, 222U, 64U, 3U), PadStrideInfo(1, 1, 1, 1));
57*c217d954SCole Faust         add_config(TensorShape(112U, 113U, 64U, 2U), TensorShape(3U, 3U, 64U, 128U), TensorShape(128U), TensorShape(110U, 111U, 128U, 2U), PadStrideInfo(1, 1, 0, 0));
58*c217d954SCole Faust         add_config(TensorShape(111U, 112U, 127U, 4U), TensorShape(3U, 3U, 127U, 128U), TensorShape(128U), TensorShape(111U, 112U, 128U, 4U), PadStrideInfo(1, 1, 1, 1));
59*c217d954SCole Faust     }
60*c217d954SCole Faust };
61*c217d954SCole Faust 
62*c217d954SCole Faust class LargeWinogradConvolutionLayer3x1Dataset final : public ConvolutionLayerDataset
63*c217d954SCole Faust {
64*c217d954SCole Faust public:
LargeWinogradConvolutionLayer3x1Dataset()65*c217d954SCole Faust     LargeWinogradConvolutionLayer3x1Dataset()
66*c217d954SCole Faust     {
67*c217d954SCole Faust         // Kernel size 3
68*c217d954SCole Faust         // Batch size 1
69*c217d954SCole Faust         add_config(TensorShape(224U, 222U, 64U), TensorShape(3U, 1U, 64U, 64U), TensorShape(64U), TensorShape(224U, 222U, 64U), PadStrideInfo(1, 1, 1, 0));
70*c217d954SCole Faust         add_config(TensorShape(112U, 113U, 64U), TensorShape(3U, 1U, 64U, 128U), TensorShape(128U), TensorShape(112U, 113U, 128U), PadStrideInfo(1, 1, 1, 0));
71*c217d954SCole Faust         add_config(TensorShape(112U, 112U, 128U), TensorShape(3U, 1U, 128U, 129U), TensorShape(129U), TensorShape(112U, 112U, 129U), PadStrideInfo(1, 1, 1, 0));
72*c217d954SCole Faust         add_config(TensorShape(53U, 56U, 125U), TensorShape(3U, 1U, 125U, 256U), TensorShape(256U), TensorShape(51U, 56U, 256U), PadStrideInfo(1, 1, 0, 0));
73*c217d954SCole Faust         add_config(TensorShape(56U, 56U, 256U), TensorShape(3U, 1U, 256U, 256U), TensorShape(256U), TensorShape(56U, 56U, 256U), PadStrideInfo(1, 1, 1, 0));
74*c217d954SCole Faust         add_config(TensorShape(28U, 28U, 257U), TensorShape(3U, 1U, 257U, 512U), TensorShape(512U), TensorShape(26U, 28U, 512U), PadStrideInfo(1, 1, 0, 0));
75*c217d954SCole Faust         add_config(TensorShape(28U, 28U, 512U), TensorShape(3U, 1U, 512U, 512U), TensorShape(512U), TensorShape(28U, 28U, 512U), PadStrideInfo(1, 1, 1, 0));
76*c217d954SCole Faust         add_config(TensorShape(14U, 14U, 512U), TensorShape(3U, 1U, 512U, 512U), TensorShape(512U), TensorShape(12U, 14U, 512U), PadStrideInfo(1, 1, 0, 0));
77*c217d954SCole Faust         // Batch size 3, 2 and 4
78*c217d954SCole Faust         add_config(TensorShape(224U, 222U, 64U, 3U), TensorShape(3U, 1U, 64U, 64U), TensorShape(64U), TensorShape(224U, 222U, 64U, 3U), PadStrideInfo(1, 1, 1, 0));
79*c217d954SCole Faust         add_config(TensorShape(112U, 113U, 64U, 2U), TensorShape(3U, 1U, 64U, 128U), TensorShape(128U), TensorShape(110U, 113U, 128U, 2U), PadStrideInfo(1, 1, 0, 0));
80*c217d954SCole Faust         add_config(TensorShape(111U, 112U, 127U, 4U), TensorShape(3U, 1U, 127U, 128U), TensorShape(128U), TensorShape(111U, 112U, 128U, 4U), PadStrideInfo(1, 1, 1, 0));
81*c217d954SCole Faust     }
82*c217d954SCole Faust };
83*c217d954SCole Faust 
84*c217d954SCole Faust class LargeWinogradConvolutionLayer1x3Dataset final : public ConvolutionLayerDataset
85*c217d954SCole Faust {
86*c217d954SCole Faust public:
LargeWinogradConvolutionLayer1x3Dataset()87*c217d954SCole Faust     LargeWinogradConvolutionLayer1x3Dataset()
88*c217d954SCole Faust     {
89*c217d954SCole Faust         // Kernel size 3
90*c217d954SCole Faust         // Batch size 1
91*c217d954SCole Faust         add_config(TensorShape(224U, 222U, 64U), TensorShape(1U, 3U, 64U, 64U), TensorShape(64U), TensorShape(224U, 222U, 64U), PadStrideInfo(1, 1, 0, 1));
92*c217d954SCole Faust         add_config(TensorShape(112U, 113U, 64U), TensorShape(1U, 3U, 64U, 128U), TensorShape(128U), TensorShape(112U, 113U, 128U), PadStrideInfo(1, 1, 0, 1));
93*c217d954SCole Faust         add_config(TensorShape(112U, 112U, 128U), TensorShape(1U, 3U, 128U, 129U), TensorShape(129U), TensorShape(112U, 110U, 129U), PadStrideInfo(1, 1, 0, 0));
94*c217d954SCole Faust         add_config(TensorShape(53U, 56U, 125U), TensorShape(1U, 3U, 125U, 256U), TensorShape(256U), TensorShape(53U, 56U, 256U), PadStrideInfo(1, 1, 0, 1));
95*c217d954SCole Faust         add_config(TensorShape(56U, 56U, 256U), TensorShape(1U, 3U, 256U, 256U), TensorShape(256U), TensorShape(56U, 54U, 256U), PadStrideInfo(1, 1, 0, 0));
96*c217d954SCole Faust         add_config(TensorShape(28U, 28U, 257U), TensorShape(1U, 3U, 257U, 512U), TensorShape(512U), TensorShape(28U, 28U, 512U), PadStrideInfo(1, 1, 0, 1));
97*c217d954SCole Faust         add_config(TensorShape(28U, 28U, 512U), TensorShape(1U, 3U, 512U, 512U), TensorShape(512U), TensorShape(28U, 28U, 512U), PadStrideInfo(1, 1, 0, 1));
98*c217d954SCole Faust         add_config(TensorShape(14U, 14U, 512U), TensorShape(1U, 3U, 512U, 512U), TensorShape(512U), TensorShape(14U, 12U, 512U), PadStrideInfo(1, 1, 0, 0));
99*c217d954SCole Faust         // Batch size 3, 2 and 4
100*c217d954SCole Faust         add_config(TensorShape(224U, 222U, 64U, 3U), TensorShape(1U, 3U, 64U, 64U), TensorShape(64U), TensorShape(224U, 222U, 64U, 3U), PadStrideInfo(1, 1, 0, 1));
101*c217d954SCole Faust         add_config(TensorShape(112U, 113U, 64U, 2U), TensorShape(1U, 3U, 64U, 128U), TensorShape(128U), TensorShape(112U, 113U, 128U, 2U), PadStrideInfo(1, 1, 0, 1));
102*c217d954SCole Faust         add_config(TensorShape(111U, 112U, 127U, 4U), TensorShape(1U, 3U, 127U, 128U), TensorShape(128U), TensorShape(111U, 112U, 128U, 4U), PadStrideInfo(1, 1, 0, 1));
103*c217d954SCole Faust     }
104*c217d954SCole Faust };
105*c217d954SCole Faust 
106*c217d954SCole Faust class LargeWinogradConvolutionLayer5x5Dataset final : public ConvolutionLayerDataset
107*c217d954SCole Faust {
108*c217d954SCole Faust public:
LargeWinogradConvolutionLayer5x5Dataset()109*c217d954SCole Faust     LargeWinogradConvolutionLayer5x5Dataset()
110*c217d954SCole Faust     {
111*c217d954SCole Faust         // Kernel size 5
112*c217d954SCole Faust         // Batch size 1
113*c217d954SCole Faust         add_config(TensorShape(224U, 224U, 3U), TensorShape(5U, 5U, 3U, 64U), TensorShape(64U), TensorShape(220U, 220U, 64U), PadStrideInfo(1, 1, 0, 0));
114*c217d954SCole Faust         add_config(TensorShape(123U, 134U, 16U), TensorShape(5U, 5U, 16U, 7U), TensorShape(7U), TensorShape(123U, 134U, 7U), PadStrideInfo(1, 1, 2, 2));
115*c217d954SCole Faust         add_config(TensorShape(181U, 152U, 42U), TensorShape(5U, 5U, 42U, 100U), TensorShape(100U), TensorShape(177U, 148U, 100U), PadStrideInfo(1, 1, 0, 0));
116*c217d954SCole Faust         add_config(TensorShape(200U, 201U, 24U), TensorShape(5U, 5U, 24U, 61), TensorShape(61U), TensorShape(200U, 201U, 61), PadStrideInfo(1, 1, 2, 2));
117*c217d954SCole Faust 
118*c217d954SCole Faust         // Batch size 2, 3 and 4
119*c217d954SCole Faust         add_config(TensorShape(224U, 224U, 3U, 2U), TensorShape(5U, 5U, 3U, 64U), TensorShape(64U), TensorShape(220U, 220U, 64U, 2U), PadStrideInfo(1, 1, 0, 0));
120*c217d954SCole Faust         add_config(TensorShape(123U, 134U, 16U, 3U), TensorShape(5U, 5U, 16U, 7U), TensorShape(7U), TensorShape(123U, 134U, 7U, 3U), PadStrideInfo(1, 1, 2, 2));
121*c217d954SCole Faust         add_config(TensorShape(181U, 152U, 42U, 4U), TensorShape(5U, 5U, 42U, 100U), TensorShape(100U), TensorShape(177U, 148U, 100U, 4U), PadStrideInfo(1, 1, 0, 0));
122*c217d954SCole Faust     }
123*c217d954SCole Faust };
124*c217d954SCole Faust 
125*c217d954SCole Faust class LargeWinogradConvolutionLayer5x1Dataset final : public ConvolutionLayerDataset
126*c217d954SCole Faust {
127*c217d954SCole Faust public:
LargeWinogradConvolutionLayer5x1Dataset()128*c217d954SCole Faust     LargeWinogradConvolutionLayer5x1Dataset()
129*c217d954SCole Faust     {
130*c217d954SCole Faust         // Batch size 1
131*c217d954SCole Faust         add_config(TensorShape(224U, 224U, 3U), TensorShape(5U, 1U, 3U, 64U), TensorShape(64U), TensorShape(224U, 224U, 64U), PadStrideInfo(1, 1, 2, 0));
132*c217d954SCole Faust         add_config(TensorShape(123U, 134U, 16U), TensorShape(5U, 1U, 16U, 7U), TensorShape(7U), TensorShape(123U, 134U, 7U), PadStrideInfo(1, 1, 2, 0));
133*c217d954SCole Faust         add_config(TensorShape(181U, 152U, 42U), TensorShape(5U, 1U, 42U, 100U), TensorShape(100U), TensorShape(177U, 152U, 100U), PadStrideInfo(1, 1, 0, 0));
134*c217d954SCole Faust         add_config(TensorShape(200U, 201U, 24U), TensorShape(5U, 1U, 24U, 61), TensorShape(61U), TensorShape(200U, 201U, 61), PadStrideInfo(1, 1, 2, 0));
135*c217d954SCole Faust 
136*c217d954SCole Faust         // Batch size 2, 3 and 4
137*c217d954SCole Faust         add_config(TensorShape(224U, 224U, 3U, 2U), TensorShape(5U, 1U, 3U, 64U), TensorShape(64U), TensorShape(224U, 224U, 64U, 2U), PadStrideInfo(1, 1, 2, 0));
138*c217d954SCole Faust         add_config(TensorShape(123U, 134U, 16U, 3U), TensorShape(5U, 1U, 16U, 7U), TensorShape(7U), TensorShape(123U, 134U, 7U, 3U), PadStrideInfo(1, 1, 2, 0));
139*c217d954SCole Faust         add_config(TensorShape(181U, 152U, 42U, 4U), TensorShape(5U, 1U, 42U, 100U), TensorShape(100U), TensorShape(177U, 152U, 100U, 4U), PadStrideInfo(1, 1, 0, 0));
140*c217d954SCole Faust     }
141*c217d954SCole Faust };
142*c217d954SCole Faust 
143*c217d954SCole Faust class LargeWinogradConvolutionLayer7x1Dataset final : public ConvolutionLayerDataset
144*c217d954SCole Faust {
145*c217d954SCole Faust public:
LargeWinogradConvolutionLayer7x1Dataset()146*c217d954SCole Faust     LargeWinogradConvolutionLayer7x1Dataset()
147*c217d954SCole Faust     {
148*c217d954SCole Faust         // Batch size 1
149*c217d954SCole Faust         add_config(TensorShape(224U, 224U, 3U), TensorShape(7U, 1U, 3U, 64U), TensorShape(64U), TensorShape(218U, 224U, 64U), PadStrideInfo(1, 1, 0, 0));
150*c217d954SCole Faust         add_config(TensorShape(123U, 134U, 16U), TensorShape(7U, 1U, 16U, 7U), TensorShape(7U), TensorShape(123U, 134U, 7U), PadStrideInfo(1, 1, 3, 0));
151*c217d954SCole Faust         add_config(TensorShape(181U, 152U, 42U), TensorShape(7U, 1U, 42U, 100U), TensorShape(100U), TensorShape(175U, 152U, 100U), PadStrideInfo(1, 1, 0, 0));
152*c217d954SCole Faust         add_config(TensorShape(200U, 201U, 24U), TensorShape(7U, 1U, 24U, 61), TensorShape(61U), TensorShape(200U, 201U, 61), PadStrideInfo(1, 1, 3, 0));
153*c217d954SCole Faust 
154*c217d954SCole Faust         // Batch size 2, 3 and 4
155*c217d954SCole Faust         add_config(TensorShape(224U, 224U, 3U, 2U), TensorShape(7U, 1U, 3U, 64U), TensorShape(64U), TensorShape(224U, 224U, 64U, 2U), PadStrideInfo(1, 1, 3, 0));
156*c217d954SCole Faust         add_config(TensorShape(123U, 134U, 16U, 3U), TensorShape(7U, 1U, 16U, 7U), TensorShape(7U), TensorShape(123U, 134U, 7U, 3U), PadStrideInfo(1, 1, 3, 0));
157*c217d954SCole Faust         add_config(TensorShape(181U, 152U, 42U, 4U), TensorShape(7U, 1U, 42U, 100U), TensorShape(100U), TensorShape(175U, 152U, 100U, 4U), PadStrideInfo(1, 1, 0, 0));
158*c217d954SCole Faust     }
159*c217d954SCole Faust };
160*c217d954SCole Faust 
161*c217d954SCole Faust class LargeWinogradConvolutionLayer1x7Dataset final : public ConvolutionLayerDataset
162*c217d954SCole Faust {
163*c217d954SCole Faust public:
LargeWinogradConvolutionLayer1x7Dataset()164*c217d954SCole Faust     LargeWinogradConvolutionLayer1x7Dataset()
165*c217d954SCole Faust     {
166*c217d954SCole Faust         // Batch size 1
167*c217d954SCole Faust         add_config(TensorShape(224U, 224U, 3U), TensorShape(1U, 7U, 3U, 64U), TensorShape(64U), TensorShape(224U, 218U, 64U), PadStrideInfo(1, 1, 0, 0));
168*c217d954SCole Faust         add_config(TensorShape(123U, 134U, 16U), TensorShape(1U, 7U, 16U, 7U), TensorShape(7U), TensorShape(123U, 134U, 7U), PadStrideInfo(1, 1, 0, 3));
169*c217d954SCole Faust         add_config(TensorShape(181U, 152U, 42U), TensorShape(1U, 7U, 42U, 100U), TensorShape(100U), TensorShape(181U, 146U, 100U), PadStrideInfo(1, 1, 0, 0));
170*c217d954SCole Faust         add_config(TensorShape(200U, 201U, 24U), TensorShape(1U, 7U, 24U, 61), TensorShape(61U), TensorShape(200U, 201U, 61), PadStrideInfo(1, 1, 0, 3));
171*c217d954SCole Faust 
172*c217d954SCole Faust         // Batch size 2, 3 and 4
173*c217d954SCole Faust         add_config(TensorShape(224U, 224U, 3U, 2U), TensorShape(1U, 7U, 3U, 64U), TensorShape(64U), TensorShape(224U, 224U, 64U, 2U), PadStrideInfo(1, 1, 0, 3));
174*c217d954SCole Faust         add_config(TensorShape(123U, 134U, 16U, 3U), TensorShape(1U, 7U, 16U, 7U), TensorShape(7U), TensorShape(123U, 134U, 7U, 3U), PadStrideInfo(1, 1, 0, 3));
175*c217d954SCole Faust         add_config(TensorShape(181U, 152U, 42U, 4U), TensorShape(1U, 7U, 42U, 100U), TensorShape(100U), TensorShape(181U, 146U, 100U, 4U), PadStrideInfo(1, 1, 0, 0));
176*c217d954SCole Faust     }
177*c217d954SCole Faust };
178*c217d954SCole Faust 
179*c217d954SCole Faust class LargeWinogradConvolutionLayer1x5Dataset final : public ConvolutionLayerDataset
180*c217d954SCole Faust {
181*c217d954SCole Faust public:
LargeWinogradConvolutionLayer1x5Dataset()182*c217d954SCole Faust     LargeWinogradConvolutionLayer1x5Dataset()
183*c217d954SCole Faust     {
184*c217d954SCole Faust         // Batch size 1
185*c217d954SCole Faust         add_config(TensorShape(224U, 224U, 3U), TensorShape(1U, 5U, 3U, 64U), TensorShape(64U), TensorShape(224U, 224U, 64U), PadStrideInfo(1, 1, 0, 2));
186*c217d954SCole Faust         add_config(TensorShape(123U, 134U, 16U), TensorShape(1U, 5U, 16U, 7U), TensorShape(7U), TensorShape(123U, 130U, 7U), PadStrideInfo(1, 1, 0, 0));
187*c217d954SCole Faust         add_config(TensorShape(181U, 152U, 42U), TensorShape(1U, 5U, 42U, 100U), TensorShape(100U), TensorShape(181U, 148U, 100U), PadStrideInfo(1, 1, 0, 0));
188*c217d954SCole Faust         add_config(TensorShape(200U, 201U, 24U), TensorShape(1U, 5U, 24U, 61), TensorShape(61U), TensorShape(200U, 201U, 61), PadStrideInfo(1, 1, 0, 2));
189*c217d954SCole Faust 
190*c217d954SCole Faust         // Batch size 2, 3 and 4
191*c217d954SCole Faust         add_config(TensorShape(224U, 224U, 3U, 2U), TensorShape(1U, 5U, 3U, 64U), TensorShape(64U), TensorShape(224U, 224U, 64U, 2U), PadStrideInfo(1, 1, 0, 2));
192*c217d954SCole Faust         add_config(TensorShape(123U, 134U, 16U, 3U), TensorShape(1U, 5U, 16U, 7U), TensorShape(7U), TensorShape(123U, 130U, 7U, 3U), PadStrideInfo(1, 1, 0, 0));
193*c217d954SCole Faust         add_config(TensorShape(181U, 152U, 42U, 4U), TensorShape(1U, 5U, 42U, 100U), TensorShape(100U), TensorShape(181U, 148U, 100U, 4U), PadStrideInfo(1, 1, 0, 0));
194*c217d954SCole Faust     }
195*c217d954SCole Faust };
196*c217d954SCole Faust 
197*c217d954SCole Faust class LargeConvolutionLayerDataset final : public ConvolutionLayerDataset
198*c217d954SCole Faust {
199*c217d954SCole Faust public:
200*c217d954SCole Faust     /** Shapes taken from use-cases such as AlexNet, MobileNet, SqueezeNet, etc. */
LargeConvolutionLayerDataset()201*c217d954SCole Faust     LargeConvolutionLayerDataset()
202*c217d954SCole Faust     {
203*c217d954SCole Faust         // Batch size 1
204*c217d954SCole Faust         add_config(TensorShape(227U, 227U, 3U), TensorShape(11U, 11U, 3U, 96U), TensorShape(96U), TensorShape(55U, 55U, 96U), PadStrideInfo(4, 4, 0, 0));
205*c217d954SCole Faust         add_config(TensorShape(27U, 27U, 96U), TensorShape(5U, 5U, 96U, 256U), TensorShape(256U), TensorShape(27U, 27U, 256U), PadStrideInfo(1, 1, 2, 2));
206*c217d954SCole Faust         add_config(TensorShape(13U, 13U, 256U), TensorShape(1U, 1U, 256U, 384U), TensorShape(384U), TensorShape(13U, 13U, 384U), PadStrideInfo(1, 1, 0, 0));
207*c217d954SCole Faust         add_config(TensorShape(224U, 224U, 3U), TensorShape(7U, 7U, 3U, 64U), TensorShape(64U), TensorShape(112U, 112U, 64U), PadStrideInfo(2, 2, 3, 3));
208*c217d954SCole Faust         // Batch size 4
209*c217d954SCole Faust         add_config(TensorShape(227U, 227U, 3U, 4U), TensorShape(11U, 11U, 3U, 96U), TensorShape(96U), TensorShape(55U, 55U, 96U, 4U), PadStrideInfo(4, 4, 0, 0));
210*c217d954SCole Faust         add_config(TensorShape(27U, 27U, 96U, 4U), TensorShape(5U, 5U, 96U, 256U), TensorShape(256U), TensorShape(27U, 27U, 256U, 4U), PadStrideInfo(1, 1, 2, 2));
211*c217d954SCole Faust         add_config(TensorShape(13U, 13U, 256U, 4U), TensorShape(1U, 1U, 256U, 384U), TensorShape(384U), TensorShape(13U, 13U, 384U, 4U), PadStrideInfo(1, 1, 0, 0));
212*c217d954SCole Faust         add_config(TensorShape(224U, 224U, 3U, 4U), TensorShape(7U, 7U, 3U, 64U), TensorShape(64U), TensorShape(112U, 112U, 64U, 4U), PadStrideInfo(2, 2, 3, 3));
213*c217d954SCole Faust     }
214*c217d954SCole Faust };
215*c217d954SCole Faust 
216*c217d954SCole Faust class LargeGroupedConvolutionLayerDataset final : public ConvolutionLayerDataset
217*c217d954SCole Faust {
218*c217d954SCole Faust public:
LargeGroupedConvolutionLayerDataset()219*c217d954SCole Faust     LargeGroupedConvolutionLayerDataset()
220*c217d954SCole Faust     {
221*c217d954SCole Faust         // Batch size 1
222*c217d954SCole Faust         add_config(TensorShape(227U, 227U, 4U), TensorShape(11U, 11U, 2U, 96U), TensorShape(96U), TensorShape(55U, 55U, 96U), PadStrideInfo(4, 4, 0, 0));
223*c217d954SCole Faust         add_config(TensorShape(27U, 27U, 96U), TensorShape(5U, 5U, 24U, 256U), TensorShape(256U), TensorShape(27U, 27U, 256U), PadStrideInfo(1, 1, 2, 2));
224*c217d954SCole Faust         add_config(TensorShape(13U, 13U, 256U), TensorShape(1U, 1U, 128U, 384U), TensorShape(384U), TensorShape(13U, 13U, 384U), PadStrideInfo(1, 1, 0, 0));
225*c217d954SCole Faust         add_config(TensorShape(13U, 13U, 384U), TensorShape(3U, 3U, 128U, 384U), TensorShape(384U), TensorShape(13U, 13U, 384U), PadStrideInfo(1, 1, 1, 1));
226*c217d954SCole Faust         // Batch size 4
227*c217d954SCole Faust         add_config(TensorShape(227U, 227U, 4U, 4U), TensorShape(11U, 11U, 2U, 96U), TensorShape(96U), TensorShape(55U, 55U, 96U, 4U), PadStrideInfo(4, 4, 0, 0));
228*c217d954SCole Faust         add_config(TensorShape(27U, 27U, 96U, 4U), TensorShape(5U, 5U, 24U, 256U), TensorShape(256U), TensorShape(27U, 27U, 256U, 4U), PadStrideInfo(1, 1, 2, 2));
229*c217d954SCole Faust         add_config(TensorShape(13U, 13U, 256U, 4U), TensorShape(3U, 3U, 128U, 384U), TensorShape(384U), TensorShape(13U, 13U, 384U, 4U), PadStrideInfo(1, 1, 1, 1));
230*c217d954SCole Faust         add_config(TensorShape(13U, 13U, 384U, 4U), TensorShape(3U, 3U, 128U, 384U), TensorShape(384U), TensorShape(13U, 13U, 384U, 4U), PadStrideInfo(1, 1, 1, 1));
231*c217d954SCole Faust     }
232*c217d954SCole Faust };
233*c217d954SCole Faust } // namespace datasets
234*c217d954SCole Faust } // namespace test
235*c217d954SCole Faust } // namespace arm_compute
236*c217d954SCole Faust #endif /* ARM_COMPUTE_TEST_LARGE_CONVOLUTION_LAYER_DATASET */
237