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
5db482cd
Commit
5db482cd
authored
Dec 09, 2021
by
andyjpaddle
Browse files
fix det slim export
parent
2d14b487
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
configs/det/ch_PP-OCRv2/ch_PP-OCRv2_det_cml.yml
configs/det/ch_PP-OCRv2/ch_PP-OCRv2_det_cml.yml
+1
-0
deploy/slim/quantization/export_model.py
deploy/slim/quantization/export_model.py
+2
-2
No files found.
configs/det/ch_PP-OCRv2/ch_PP-OCRv2_det_cml.yml
View file @
5db482cd
...
...
@@ -18,6 +18,7 @@ Global:
Architecture
:
name
:
DistillationModel
algorithm
:
Distillation
model_type
:
det
Models
:
Teacher
:
freeze_params
:
true
...
...
deploy/slim/quantization/export_model.py
View file @
5db482cd
...
...
@@ -111,7 +111,7 @@ def main():
valid_dataloader
=
build_dataloader
(
config
,
'Eval'
,
device
,
logger
)
use_srn
=
config
[
'Architecture'
][
'algorithm'
]
==
"SRN"
model_type
=
None
model_type
=
config
[
'Architecture'
].
get
(
'model_type'
,
None
)
# start eval
metric
=
program
.
eval
(
model
,
valid_dataloader
,
post_process_class
,
eval_class
,
model_type
,
use_srn
)
...
...
@@ -120,7 +120,7 @@ def main():
for
k
,
v
in
metric
.
items
():
logger
.
info
(
'{}:{}'
.
format
(
k
,
v
))
infer_shape
=
[
3
,
32
,
100
]
if
model_type
!
=
"
det
"
else
[
3
,
640
,
640
]
infer_shape
=
[
3
,
32
,
100
]
if
model_type
=
=
"
rec
"
else
[
3
,
640
,
640
]
save_path
=
config
[
"Global"
][
"save_inference_dir"
]
...
...
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