From 03f8464d7b1cffd1c9094c5019187832dbc72339 Mon Sep 17 00:00:00 2001 From: Lin Manhui Date: Mon, 31 Jul 2023 16:39:10 +0800 Subject: [PATCH] fix ppdet/utils/states (#8421) (#8496) * fix a code * fix the tensor to float Co-authored-by: luyao-cv <1367355728@qq.com> --- 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