!1933 edit bert example scripts

Merge pull request !1933 from yoonlee666/edit-example
This commit is contained in:
mindspore-ci-bot 2020-06-10 11:04:00 +08:00 committed by Gitee
commit d9c7a8400e
2 changed files with 1 additions and 1 deletions

View File

@ -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))