Skip to content

Commit

Permalink
fix label_dict save bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyubo0722 committed Nov 25, 2024
1 parent b1b50fc commit 96cffd7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ppocr/utils/save_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,11 @@ def update_train_results(config, prefix, metric_info, done_flag=False, last_num=
else:
train_results = {}
train_results["model_name"] = config["Global"]["pdx_model_name"]
label_dict_path = os.path.abspath(
config["Global"].get("character_dict_path", "")
)
label_dict_path = config["Global"].get("character_dict_path", "")
if label_dict_path != "":
label_dict_path = os.path.abspath(label_dict_path)
if not os.path.exists(label_dict_path):
label_dict_path = ""
label_dict_path = label_dict_path
train_results["label_dict"] = label_dict_path
train_results["train_log"] = "train.log"
train_results["visualdl_log"] = ""
Expand Down

0 comments on commit 96cffd7

Please sign in to comment.