From 420dd76192a826eb93052e5956db67573a01311b Mon Sep 17 00:00:00 2001 From: luyao-cv <1367355728@qq.com> Date: Mon, 10 Jul 2023 08:38:35 +0000 Subject: [PATCH] fix the tensor to float --- ppdet/utils/stats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppdet/utils/stats.py b/ppdet/utils/stats.py index b7ae5045124..c070e6544ed 100644 --- a/ppdet/utils/stats.py +++ b/ppdet/utils/stats.py @@ -74,7 +74,7 @@ def update(self, stats): for k in stats.keys() } for k, v in self.meters.items(): - v.update(stats[k]) + v.update(float(stats[k])) def get(self, extras=None): stats = collections.OrderedDict()