From 23fb6f8fc364a83e94ad4c22589ea21da3bda654 Mon Sep 17 00:00:00 2001 From: buxue Date: Wed, 23 Sep 2020 20:00:18 +0800 Subject: [PATCH] fix buf of pow bprop --- mindspore/ccsrc/pipeline/pynative/pynative_execute.cc | 4 ---- mindspore/ops/_grad/grad_math_ops.py | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc index 8363be959c2..c807e3a2a13 100644 --- a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc +++ b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc @@ -1185,10 +1185,6 @@ py::tuple RunOp(const py::args &args) { std::ostringstream oss; trace::TraceGraphEval(); trace::GetEvalStackInfo(oss); - // call py::print to output function call stack to STDOUT, in case of output the log to file, the user can see - // these info from screen, no need to open log file to find these info - py::print(oss.str()); - MS_LOG(ERROR) << oss.str(); PynativeExecutor::GetInstance()->Clean(); // re-throw this exception to Python interpreter to handle it throw(py::error_already_set(ex)); diff --git a/mindspore/ops/_grad/grad_math_ops.py b/mindspore/ops/_grad/grad_math_ops.py index ced99921cc9..dbd0df22b0d 100755 --- a/mindspore/ops/_grad/grad_math_ops.py +++ b/mindspore/ops/_grad/grad_math_ops.py @@ -526,6 +526,7 @@ def get_bprop_pow(self): def bprop(x, power, out, dout): bc_dx = power * pow_op(x, power - 1.0) * dout + x[x < 0] = 1 bc_dpower = out * ln(x) * dout return binop_grad_common(x, power, bc_dx, bc_dpower)