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
fe8d103c
"vscode:/vscode.git/clone" did not exist on "ced53ca91904179a201777380bd8d59419d36ede"
Unverified
Commit
fe8d103c
authored
Jun 24, 2022
by
zhoujun
Committed by
GitHub
Jun 24, 2022
Browse files
update save model (#6697)
parent
ab30f23f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ppocr/utils/save_load.py
ppocr/utils/save_load.py
+2
-2
No files found.
ppocr/utils/save_load.py
View file @
fe8d103c
...
...
@@ -177,9 +177,9 @@ def save_model(model,
model
.
backbone
.
model
.
save_pretrained
(
model_prefix
)
metric_prefix
=
os
.
path
.
join
(
model_prefix
,
'metric'
)
# save metric and config
if
is_best
:
with
open
(
metric_prefix
+
'.states'
,
'wb'
)
as
f
:
pickle
.
dump
(
kwargs
,
f
,
protocol
=
2
)
if
is_best
:
logger
.
info
(
'save best model is to {}'
.
format
(
model_prefix
))
else
:
logger
.
info
(
"save model in {}"
.
format
(
model_prefix
))
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