diff --git a/paddle/function/neon/NeonDepthwiseConv.cpp b/paddle/function/neon/NeonDepthwiseConv.cpp index 199e23c4cba8a5a552f7313199d99cc83ce57d43..d7ac83da41aaba5cd38b042d0381dea527f9c42d 100644 --- a/paddle/function/neon/NeonDepthwiseConv.cpp +++ b/paddle/function/neon/NeonDepthwiseConv.cpp @@ -66,16 +66,18 @@ class NeonDepthwiseConvFunction : public ConvFunctionBase { float* inputPadding = inputData; int padInputHeight = inputHeight + 2 * paddingH(); int padInputWidth = inputWidth + 2 * paddingW(); - int newSize = batchSize * (inputChannels + 1) * padInputHeight * padInputWidth; + int newSize = + batchSize * (inputChannels + 1) * padInputHeight * padInputWidth; + resizeBuffer(newSize); inputPadding = reinterpret_cast(memory_->getBuf()); neon::Padding::run(inputData, - inputPadding, - batchSize * inputChannels, - inputHeight, - inputWidth, - padInputHeight, - padInputWidth); + inputPadding, + batchSize * inputChannels, + inputHeight, + inputWidth, + padInputHeight, + padInputWidth); std::function