diff --git a/paddle/fluid/operators/optimizers/momentum_op.h b/paddle/fluid/operators/optimizers/momentum_op.h index 0eff4f300a4f3c65b18f455f789dbe753d7d3d3e..64acdfe890fbc10a2ca60632a68fb7612157e619 100644 --- a/paddle/fluid/operators/optimizers/momentum_op.h +++ b/paddle/fluid/operators/optimizers/momentum_op.h @@ -465,14 +465,8 @@ class MomentumOpKernel : public framework::OpKernel { void Compute(const framework::ExecutionContext& ctx) const override { const bool multi_precision = ctx.Attr("multi_precision"); if (multi_precision) { - LOG_FIRST_N(INFO, 1) << R"CODE( - InnerCompute(ctx, multi_precision); - )CODE"; InnerCompute(ctx, multi_precision); } else { - LOG_FIRST_N(INFO, 1) << R"CODE( - InnerCompute(ctx, multi_precision); - )CODE"; InnerCompute(ctx, multi_precision); } } @@ -504,17 +498,6 @@ class MomentumOpKernel : public framework::OpKernel { const framework::Tensor* master_param = nullptr; framework::Tensor* master_param_out = nullptr; if (multi_precision) { - LOG_FIRST_N(INFO, 1) << R"CODE( - bool has_master = - ctx.HasInput("MasterParam") && ctx.HasOutput("MasterParamOut"); - PADDLE_ENFORCE_EQ(has_master, true, - platform::errors::InvalidArgument( - "The Input(MasterParam) and Output(MasterParamOut) " - "should not be null when " - "the attr `multi_precision` is true")); - master_param = ctx.Input("MasterParam"); - master_param_out = ctx.Output("MasterParamOut"); - )CODE"; bool has_master = ctx.HasInput("MasterParam") && ctx.HasOutput("MasterParamOut"); PADDLE_ENFORCE_EQ(has_master, true, @@ -547,14 +530,6 @@ class MomentumOpKernel : public framework::OpKernel { static_cast(ctx.device_context()), param->numel()); if (use_nesterov) { - LOG_FIRST_N(INFO, 1) << R"CODE( - DenseMomentumFunctor functor( - param->data(), grad->data(), velocity->data(), - learning_rate->data(), master_in_data, mu, rescale_grad, - param->numel(), regularization_flag, regularization_coeff, - param_out->mutable_data(ctx.GetPlace()), - velocity_out->mutable_data(ctx.GetPlace()), master_out_data); - )CODE"; DenseMomentumFunctor functor( param->data(), grad->data(), velocity->data(), learning_rate->data(), master_in_data, mu, rescale_grad, @@ -564,14 +539,6 @@ class MomentumOpKernel : public framework::OpKernel { for_range(functor); } else { - LOG_FIRST_N(INFO, 1) << R"CODE( - DenseMomentumFunctor functor( - param->data(), grad->data(), velocity->data(), - learning_rate->data(), master_in_data, mu, rescale_grad, - param->numel(), regularization_flag, regularization_coeff, - param_out->mutable_data(ctx.GetPlace()), - velocity_out->mutable_data(ctx.GetPlace()), master_out_data); - )CODE"; DenseMomentumFunctor functor( param->data(), grad->data(), velocity->data(), learning_rate->data(), master_in_data, mu, rescale_grad,