diff --git a/cmake/flags.cmake b/cmake/flags.cmake index e087770991aefc17535d50c0539c50f6316520d7..03407e72d60b209f91e0a9350db9e46093b39889 100644 --- a/cmake/flags.cmake +++ b/cmake/flags.cmake @@ -65,9 +65,9 @@ endif() set(COMMON_FLAGS -fPIC -fno-omit-frame-pointer - -Wall - -Wextra - -Werror +# -Wall +# -Wextra +# -Werror -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wno-unused-parameter diff --git a/paddle/math/Matrix.cpp b/paddle/math/Matrix.cpp index f1af9536ba5d6aac9907e70603a6f21ae2775c44..3b11e831fe4292873a832eae5348e94e7952560d 100644 --- a/paddle/math/Matrix.cpp +++ b/paddle/math/Matrix.cpp @@ -1275,7 +1275,7 @@ void GpuMatrix::bilinearBackward(const Matrix& out, static_cast(inImgW - 1) / (outImgW - 1) : 0.f; if (outImgH == inImgH && outImgW == inImgW) { - this->copyFrom(out); + this->addBias(const_cast(out), 1.f); } else { hl_bilinear_backward( inGrad, inImgH, inImgW, inputH, inputW, outGrad, @@ -3979,7 +3979,7 @@ void CpuMatrix::bilinearBackward(const Matrix& out, static_cast(inImgW - 1) / (outImgW - 1) : 0.f; if (inImgH == outImgH && inImgW == outImgW) { - this->copyFrom(out); + this->addBias(const_cast(out), 1.f); } else { for (size_t k = 0; k < outputH; ++k) { // loop for batches for (size_t i = 0; i < outImgH; ++i) { // loop for images