From b751a8056f8d49dc3037c8e0291e08ed600e5ab8 Mon Sep 17 00:00:00 2001 From: LielinJiang <50691816+LielinJiang@users.noreply.github.com> Date: Tue, 1 Jun 2021 14:14:18 +0800 Subject: [PATCH] fix benchmark time count use hapi (#33225) --- python/paddle/hapi/callbacks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/paddle/hapi/callbacks.py b/python/paddle/hapi/callbacks.py index 61ae8b42d63..834b92f9fe6 100644 --- a/python/paddle/hapi/callbacks.py +++ b/python/paddle/hapi/callbacks.py @@ -395,6 +395,10 @@ class ProgBarLogger(Callback): values.append( ('ips', "%.5f samples/sec" % (samples / (timer['data_time'] + timer['batch_time'])))) + timer['count'] = 0 + timer['samples'] = 0 + timer['data_time'] = 0. + timer['batch_time'] = 0. progbar.update(steps, values) -- GitLab