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
697719ba
Commit
697719ba
authored
Jul 15, 2021
by
WenmuZhou
Browse files
fix error in load model
parent
818ab4ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
ppocr/utils/save_load.py
ppocr/utils/save_load.py
+1
-1
No files found.
ppocr/utils/save_load.py
View file @
697719ba
...
@@ -77,7 +77,7 @@ def init_model(config, model, optimizer=None, lr_scheduler=None):
...
@@ -77,7 +77,7 @@ def init_model(config, model, optimizer=None, lr_scheduler=None):
pretrained_model
=
[
pretrained_model
]
pretrained_model
=
[
pretrained_model
]
for
pretrained
in
pretrained_model
:
for
pretrained
in
pretrained_model
:
if
not
(
os
.
path
.
isdir
(
pretrained
)
or
if
not
(
os
.
path
.
isdir
(
pretrained
)
or
os
.
path
.
exists
(
pretrained
+
'.pdparams'
)):
not
os
.
path
.
exists
(
pretrained
+
'.pdparams'
)):
raise
ValueError
(
"Model pretrain path {} does not "
raise
ValueError
(
"Model pretrain path {} does not "
"exists."
.
format
(
pretrained
))
"exists."
.
format
(
pretrained
))
param_state_dict
=
paddle
.
load
(
pretrained
+
'.pdparams'
)
param_state_dict
=
paddle
.
load
(
pretrained
+
'.pdparams'
)
...
...
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