From be94977426d5bb7e912e1a64c7feeb58c783d419 Mon Sep 17 00:00:00 2001 From: iamyoyo <30454163+iamyoyo@users.noreply.github.com> Date: Mon, 1 Feb 2021 15:27:56 +0800 Subject: [PATCH] =?UTF-8?q?program.py=20257=E8=A1=8C=20=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=90=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PaddleOCR/tools/program.py的第254行的变量名原为cur_metirc,需要修改为cur_metric,如果不修改在运行是,会提示 The variable name of line 254 can be changed to cur_ Metric. If you do not modify it, you will be prompted when it is running "E:\XXX\PaddleOCR\tools\program.py", line 257, in train ['{}: {}'.format(k, v) for k, v in cur_metric.items()])) NameError: name 'cur_metric' is not defined --- tools/program.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/program.py b/tools/program.py index 2daf309a..a24d6ca7 100755 --- a/tools/program.py +++ b/tools/program.py @@ -251,7 +251,7 @@ def train(config, min_average_window=10000, max_average_window=15625) Model_Average.apply() - cur_metric = eval(model, valid_dataloader, post_process_class, # 原cur_metirc修改为 cur_metric + cur_metric = eval(model, valid_dataloader, post_process_class, eval_class) cur_metric_str = 'cur metric, {}'.format(', '.join( ['{}: {}'.format(k, v) for k, v in cur_metric.items()])) -- GitLab