未验证 提交 be949774 编写于 作者: I iamyoyo 提交者: GitHub

program.py 257行 变量名问题

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
上级 a92bb6d3
...@@ -251,7 +251,7 @@ def train(config, ...@@ -251,7 +251,7 @@ def train(config,
min_average_window=10000, min_average_window=10000,
max_average_window=15625) max_average_window=15625)
Model_Average.apply() 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) eval_class)
cur_metric_str = 'cur metric, {}'.format(', '.join( cur_metric_str = 'cur metric, {}'.format(', '.join(
['{}: {}'.format(k, v) for k, v in cur_metric.items()])) ['{}: {}'.format(k, v) for k, v in cur_metric.items()]))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册