From ab36f3d3cdabe0538a8fe42f12c6609557e5c712 Mon Sep 17 00:00:00 2001 From: yoonlee666 Date: Tue, 9 Jun 2020 20:59:32 +0800 Subject: [PATCH] edit example script --- model_zoo/bert/evaluation.py | 2 +- .../bert/{bert_tdt_lossscale.py => test_bert_tdt_lossscale.py} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tests/st/networks/models/bert/{bert_tdt_lossscale.py => test_bert_tdt_lossscale.py} (100%) diff --git a/model_zoo/bert/evaluation.py b/model_zoo/bert/evaluation.py index c58bf836fdf..320c99cc59a 100644 --- a/model_zoo/bert/evaluation.py +++ b/model_zoo/bert/evaluation.py @@ -141,7 +141,7 @@ def test_eval(): if cfg.task == "NER": print("Precision {:.6f} ".format(callback.TP / (callback.TP + callback.FP))) print("Recall {:.6f} ".format(callback.TP / (callback.TP + callback.FN))) - print("F1 {:.6f} ".format(2*callback.TP / (2*callback.TP + callback.FP + callback.FP))) + print("F1 {:.6f} ".format(2*callback.TP / (2*callback.TP + callback.FP + callback.FN))) else: print("acc_num {} , total_num {}, accuracy {:.6f}".format(callback.acc_num, callback.total_num, callback.acc_num / callback.total_num)) diff --git a/tests/st/networks/models/bert/bert_tdt_lossscale.py b/tests/st/networks/models/bert/test_bert_tdt_lossscale.py similarity index 100% rename from tests/st/networks/models/bert/bert_tdt_lossscale.py rename to tests/st/networks/models/bert/test_bert_tdt_lossscale.py