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
c4ca35a2
Unverified
Commit
c4ca35a2
authored
Jul 27, 2020
by
shaohua.zhang
Committed by
GitHub
Jul 27, 2020
Browse files
Update utility.py
parent
d7d35578
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
ppocr/utils/utility.py
ppocr/utils/utility.py
+3
-0
No files found.
ppocr/utils/utility.py
View file @
c4ca35a2
...
...
@@ -21,6 +21,7 @@ import os
import
shutil
import
tempfile
import
paddle
import
paddle.fluid
as
fluid
from
.utility
import
initial_logger
...
...
@@ -112,12 +113,14 @@ def init_model(config, program, exe):
path
=
checkpoints
fluid
.
load
(
program
,
path
,
exe
)
logger
.
info
(
"Finish initing model from {}"
.
format
(
path
))
return
pretrain_weights
=
config
[
'Global'
].
get
(
'pretrain_weights'
)
if
pretrain_weights
:
path
=
pretrain_weights
load_params
(
exe
,
program
,
path
)
logger
.
info
(
"Finish initing model from {}"
.
format
(
path
))
return
def
save_model
(
program
,
model_path
):
...
...
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