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
6c193662
Commit
6c193662
authored
Apr 29, 2022
by
LDOUBLEV
Browse files
fix comment
parent
a2cdabd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
deploy/slim/quantization/quant.py
deploy/slim/quantization/quant.py
+6
-6
No files found.
deploy/slim/quantization/quant.py
View file @
6c193662
...
@@ -161,6 +161,12 @@ def main(config, device, logger, vdl_writer):
...
@@ -161,6 +161,12 @@ def main(config, device, logger, vdl_writer):
if
config
[
"Global"
][
"pretrained_model"
]
is
not
None
:
if
config
[
"Global"
][
"pretrained_model"
]
is
not
None
:
pre_best_model_dict
=
load_model
(
config
,
model
)
pre_best_model_dict
=
load_model
(
config
,
model
)
quanter
=
QAT
(
config
=
quant_config
,
act_preprocess
=
PACT
)
quanter
.
quantize
(
model
)
if
config
[
'Global'
][
'distributed'
]:
model
=
paddle
.
DataParallel
(
model
)
# build loss
# build loss
loss_class
=
build_loss
(
config
[
'Loss'
])
loss_class
=
build_loss
(
config
[
'Loss'
])
...
@@ -175,12 +181,6 @@ def main(config, device, logger, vdl_writer):
...
@@ -175,12 +181,6 @@ def main(config, device, logger, vdl_writer):
if
config
[
"Global"
][
"checkpoints"
]
is
not
None
:
if
config
[
"Global"
][
"checkpoints"
]
is
not
None
:
pre_best_model_dict
=
load_model
(
config
,
model
,
optimizer
)
pre_best_model_dict
=
load_model
(
config
,
model
,
optimizer
)
quanter
=
QAT
(
config
=
quant_config
,
act_preprocess
=
PACT
)
quanter
.
quantize
(
model
)
if
config
[
'Global'
][
'distributed'
]:
model
=
paddle
.
DataParallel
(
model
)
# build metric
# build metric
eval_class
=
build_metric
(
config
[
'Metric'
])
eval_class
=
build_metric
(
config
[
'Metric'
])
...
...
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