From 931d138bb3d8c66fad8ae8a801c852a6aaf8c702 Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Mon, 16 Nov 2020 19:11:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ppocr/utils/stats.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ppocr/utils/stats.py b/ppocr/utils/stats.py index 4b1ac98a..179b0082 100755 --- a/ppocr/utils/stats.py +++ b/ppocr/utils/stats.py @@ -65,5 +65,8 @@ class TrainingStats(object): def log(self, extras=None): d = self.get(extras) - strs = ', '.join(str(dict({x: y})).strip('{}') for x, y in d.items()) + strs = [] + for k, v in d.items(): + strs.append('{}: {:x<6f}'.format(k, v)) + strs = ', '.join(strs) return strs -- GitLab