Merge pull request #11017 from NHZlX/fix_depthwise_neon_bug

fix neon depthwise conv bug
release/0.13.0
Zhaolong Xing 7 years ago committed by GitHub
commit 2c14df344f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -66,18 +66,18 @@ class NeonDepthwiseConvFunction : public ConvFunctionBase {
float* inputPadding = inputData;
int padInputHeight = inputHeight + 2 * paddingH();
int padInputWidth = inputWidth + 2 * paddingW();
if (paddingH() > 0 || paddingW() > 0) {
int newSize = batchSize * inputChannels * padInputHeight * padInputWidth;
resizeBuffer<Device>(newSize);
inputPadding = reinterpret_cast<float*>(memory_->getBuf());
neon::Padding<float>::run(inputData,
inputPadding,
batchSize * inputChannels,
inputHeight,
inputWidth,
padInputHeight,
padInputWidth);
}
int newSize =
batchSize * (inputChannels + 1) * padInputHeight * padInputWidth;
resizeBuffer<Device>(newSize);
inputPadding = reinterpret_cast<float*>(memory_->getBuf());
neon::Padding<float>::run(inputData,
inputPadding,
batchSize * inputChannels,
inputHeight,
inputWidth,
padInputHeight,
padInputWidth);
std::function<void(
const float*, const float*, int, int, int, int, int, int, float*)>

Loading…
Cancel
Save