From 4419881f2fc01b5f27ebb6a32edd0a5d2622630f Mon Sep 17 00:00:00 2001 From: wuyongkang Date: Fri, 3 Jul 2020 11:54:04 +0800 Subject: [PATCH] Fix optimizer step counter bug --- mindspore/ccsrc/optimizer/optimizer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/optimizer/optimizer.h b/mindspore/ccsrc/optimizer/optimizer.h index 5f21de43cd9..77d4589c5ee 100644 --- a/mindspore/ccsrc/optimizer/optimizer.h +++ b/mindspore/ccsrc/optimizer/optimizer.h @@ -184,7 +184,8 @@ class Optimizer : public std::enable_shared_from_this { } } }; - use_profile ? (WITH(MsProfile::GetProfile()->Lap(counter++)) run_runc) : run_runc(); + use_profile ? (WITH(MsProfile::GetProfile()->Lap(counter)) run_runc) : run_runc(); + counter++; if (run_only_once_) { break;