提交 8007a955 编写于 作者: L LDOUBLEV

makedirs for ocr rec saved model

上级 6281a017
...@@ -284,6 +284,10 @@ def train_eval_rec_run(config, exe, train_info_dict, eval_info_dict): ...@@ -284,6 +284,10 @@ def train_eval_rec_run(config, exe, train_info_dict, eval_info_dict):
eval_batch_step = config['Global']['eval_batch_step'] eval_batch_step = config['Global']['eval_batch_step']
save_epoch_step = config['Global']['save_epoch_step'] save_epoch_step = config['Global']['save_epoch_step']
save_model_dir = config['Global']['save_model_dir'] save_model_dir = config['Global']['save_model_dir']
if save_model_dir[-1] == "/":
save_model_dir = save_model_dir[:-1]
if not os.path.exists(save_model_dir + config['Global']['algorithm']):
os.makedirs(save_model_dir)
train_stats = TrainingStats(log_smooth_window, ['loss', 'acc']) train_stats = TrainingStats(log_smooth_window, ['loss', 'acc'])
best_eval_acc = -1 best_eval_acc = -1
best_batch_id = 0 best_batch_id = 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册