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

Update program.py

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
上级 0c5c9f69
...@@ -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_metirc = eval(model, valid_dataloader, post_process_class, cur_metric = eval(model, valid_dataloader, post_process_class, # 原cur_metirc修改为 cur_metric
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.
先完成此消息的编辑!
想要评论请 注册