未验证 提交 2c14df34 编写于 作者: Z Zhaolong Xing 提交者: GitHub

Merge pull request #11017 from NHZlX/fix_depthwise_neon_bug

fix neon depthwise conv bug
...@@ -66,18 +66,18 @@ class NeonDepthwiseConvFunction : public ConvFunctionBase { ...@@ -66,18 +66,18 @@ class NeonDepthwiseConvFunction : public ConvFunctionBase {
float* inputPadding = inputData; float* inputPadding = inputData;
int padInputHeight = inputHeight + 2 * paddingH(); int padInputHeight = inputHeight + 2 * paddingH();
int padInputWidth = inputWidth + 2 * paddingW(); int padInputWidth = inputWidth + 2 * paddingW();
if (paddingH() > 0 || paddingW() > 0) { int newSize =
int newSize = batchSize * inputChannels * padInputHeight * padInputWidth; batchSize * (inputChannels + 1) * padInputHeight * padInputWidth;
resizeBuffer<Device>(newSize);
inputPadding = reinterpret_cast<float*>(memory_->getBuf()); resizeBuffer<Device>(newSize);
neon::Padding<float>::run(inputData, inputPadding = reinterpret_cast<float*>(memory_->getBuf());
inputPadding, neon::Padding<float>::run(inputData,
batchSize * inputChannels, inputPadding,
inputHeight, batchSize * inputChannels,
inputWidth, inputHeight,
padInputHeight, inputWidth,
padInputWidth); padInputHeight,
} padInputWidth);
std::function<void( std::function<void(
const float*, const float*, int, int, int, int, int, int, float*)> const float*, const float*, int, int, int, int, int, int, float*)>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册