!8085 Loss saved does not reduce precision in SummaryCollector

Merge pull request !8085 from ougongchang/fix_round
This commit is contained in:
mindspore-ci-bot 2020-11-02 09:44:37 +08:00 committed by Gitee
commit 74886f790d
1 changed files with 1 additions and 2 deletions

View File

@ -548,8 +548,7 @@ class SummaryCollector(Callback):
if not isinstance(loss, Tensor):
loss = Tensor(loss)
precision = 4
loss = Tensor(round(np.mean(loss.asnumpy()), precision))
loss = Tensor(np.mean(loss.asnumpy()))
return loss
def _get_optimizer(self, cb_params):