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
82a48a72
Unverified
Commit
82a48a72
authored
Jul 27, 2020
by
shaohua.zhang
Committed by
GitHub
Jul 27, 2020
Browse files
update import and fix some codes
remove the useless parameters and update import
parent
9af6ab8f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
ppocr/utils/save_load.py
ppocr/utils/save_load.py
+1
-4
No files found.
ppocr/utils/save_load.py
View file @
82a48a72
...
...
@@ -21,7 +21,6 @@ import os
import
shutil
import
tempfile
import
paddle
import
paddle.fluid
as
fluid
from
.utility
import
initial_logger
...
...
@@ -58,7 +57,7 @@ def _load_state(path):
return
state
def
load_params
(
exe
,
prog
,
path
,
ignore_params
=
[]
):
def
load_params
(
prog
,
path
,
ignore_params
=
None
):
"""
Load model from the given path.
Args:
...
...
@@ -113,14 +112,12 @@ 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