Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
8007a955
Commit
8007a955
authored
May 13, 2020
by
LDOUBLEV
Browse files
makedirs for ocr rec saved model
parent
6281a017
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
tools/program.py
tools/program.py
+4
-0
No files found.
tools/program.py
View file @
8007a955
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment