From 02f58862bf4bcaca8cc7ce3ec810445a980c324a Mon Sep 17 00:00:00 2001 From: luyao-cv <1367355728@qq.com> Date: Thu, 13 Jul 2023 13:27:59 +0800 Subject: [PATCH] fix ppdet/utils/states (#8421) * fix a code * 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 4cd36d91c..c070e6544 100644 --- a/ppdet/utils/stats.py +++ b/ppdet/utils/stats.py @@ -74,7 +74,7 @@ class TrainingStats(object): for k in stats.keys() } for k, v in self.meters.items(): - v.update(stats[k].numpy()) + v.update(float(stats[k])) def get(self, extras=None): stats = collections.OrderedDict() -- GitLab