@@ -61,6 +61,7 @@ void PoolCompute::Run() {
61
61
global_pooling = param.global_pooling || global_pooling;
62
62
kps_equal = kps_equal && win_ksize;
63
63
auto x_dims = param.x ->dims ();
64
+ auto w_in = x_dims[x_dims.size () - 1 ];
64
65
65
66
if (global_pooling) {
66
67
for (size_t i = 0 ; i < ksize.size (); ++i) {
@@ -92,8 +93,8 @@ void PoolCompute::Run() {
92
93
return ;
93
94
}
94
95
} else {
95
- if (x_dims[- 1 ] > 8 && ksize[0 ] == 1 && strides[0 ] == 2 &&
96
- paddings[ 0 ] == 0 && kps_equal) {
96
+ if (w_in > 8 && ksize[0 ] == 1 && strides[0 ] == 2 && paddings[ 0 ] == 0 &&
97
+ kps_equal) {
97
98
auto & ctx = this ->ctx_ ->template As <ARMContext>();
98
99
if (pooling_type == " max" ) {
99
100
lite::arm::math::pooling1x1s2p0_max (din,
@@ -109,7 +110,7 @@ void PoolCompute::Run() {
109
110
paddings[3 ]);
110
111
return ;
111
112
}
112
- } else if (x_dims[- 1 ] > 8 && ksize[0 ] == 2 && strides[0 ] == 2 &&
113
+ } else if (w_in > 8 && ksize[0 ] == 2 && strides[0 ] == 2 &&
113
114
paddings[0 ] == 0 && kps_equal) {
114
115
if (pooling_type == " max" ) {
115
116
lite::arm::math::pooling2x2s2p0_max (din,
@@ -139,7 +140,7 @@ void PoolCompute::Run() {
139
140
paddings[3 ]);
140
141
return ;
141
142
}
142
- } else if (x_dims[- 1 ] > 8 && ksize[0 ] == 2 && strides[0 ] == 2 &&
143
+ } else if (w_in > 8 && ksize[0 ] == 2 && strides[0 ] == 2 &&
143
144
paddings[0 ] == 1 && kps_equal) {
144
145
if (pooling_type == " max" ) {
145
146
lite::arm::math::pooling2x2s2p1_max (din,
0 commit comments