Skip to content

Commit 168707c

Browse files
committed
Fix a small bug.
1 parent 5df384d commit 168707c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

paddle/gserver/layers/ExpandConvLayer.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ bool ExpandConvLayer::init(const LayerMap &layerMap,
6666
// If depth wise convolution and useGpu == false and ARM-NEON
6767
if (!useGpu_ && isDepthwiseConv(channels_[i], groups_[i]) && !isDeconv_) {
6868
#if defined(__ARM_NEON__) || defined(__ARM_NEON)
69-
convType = "NeonDepthwiseConv";
69+
if ((filterSize_[i] == filterSizeY_[i]) &&
70+
(filterSize_[i] == 3 || filterSize_[i] == 4) &&
71+
(stride_[i] == strideY_[i]) && (stride_[i] == 1 || stride_[i] == 2)) {
72+
convType = "NeonDepthwiseConv";
73+
}
7074
#endif
7175
}
7276

0 commit comments

Comments
 (0)