diff --git a/paddle/math/BaseMatrix.cu b/paddle/math/BaseMatrix.cu index 6db5965789b3750f46731f157167150583130d0a..ba2b47d6cc6961a380b7db2781b4d214dea829db 100644 --- a/paddle/math/BaseMatrix.cu +++ b/paddle/math/BaseMatrix.cu @@ -442,7 +442,8 @@ DEFINE_MATRIX_UNARY_PARAMETER_OP(Clip, TWO_PARAMETER, template void BaseMatrixT::clip(T p1, T p2) { applyUnary(unary::Clip(p1, p2)); } -DEFINE_MATRIX_BINARY_PARAMETER_OP(ClipDerivative, TWO_PARAMETER, a = b < p1 ? 0 : (b > p2 ? 0 : 1)); +DEFINE_MATRIX_BINARY_PARAMETER_OP(ClipDerivative, TWO_PARAMETER, + a = b < p1 ? 0 : (b > p2 ? 0 : 1)); template void BaseMatrixT::clipDerivative(BaseMatrixT& b, T p1, T p2) { applyBinary(binary::ClipDerivative(p1, p2), b); diff --git a/paddle/operators/mean_op.h b/paddle/operators/mean_op.h index a89cb422f9b296dba6eb5358043f73d00aefc5d3..e712dee6a785749e51be7b233e85dbf39c835218 100644 --- a/paddle/operators/mean_op.h +++ b/paddle/operators/mean_op.h @@ -47,7 +47,7 @@ public: T ig_size = (T)framework::product(IG->dims()); - EigenVector::Flatten(*IG).device(*(context.GetEigenDevice())) = + EigenVector::Flatten(*IG).device(context.GetEigenDevice()) = EigenScalar::From(*OG) / ig_size; } }; diff --git a/paddle/scripts/docker/build.sh b/paddle/scripts/docker/build.sh index 69ae0ea2d72c199a8e17c0595693e5e0b2f79ee1..8de0e608c1f482e4553c07ff7ffd572d65a772aa 100644 --- a/paddle/scripts/docker/build.sh +++ b/paddle/scripts/docker/build.sh @@ -69,7 +69,7 @@ cat <