From 9b59a589b13ab7a503eb34b56067d296e7cb1c50 Mon Sep 17 00:00:00 2001 From: Zhen Wang Date: Wed, 2 Dec 2020 21:26:13 +0800 Subject: [PATCH] Remove some useless log. (#29300) --- .../fluid/operators/optimizers/momentum_op.h | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/paddle/fluid/operators/optimizers/momentum_op.h b/paddle/fluid/operators/optimizers/momentum_op.h index 0eff4f300a..64acdfe890 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, -- GitLab