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
ModelZoo
ResNet50_tensorflow
Commits
45dc706d
Commit
45dc706d
authored
Jun 22, 2022
by
Jaehong Kim
Committed by
A. Unique TensorFlower
Jun 22, 2022
Browse files
Remove redundant fake-quants for the object detection model.
PiperOrigin-RevId: 456554091
parent
f2e1a77e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
2 deletions
+1
-2
official/projects/qat/vision/modeling/factory.py
official/projects/qat/vision/modeling/factory.py
+0
-1
official/projects/qat/vision/modeling/heads/dense_prediction_heads.py
...jects/qat/vision/modeling/heads/dense_prediction_heads.py
+1
-1
No files found.
official/projects/qat/vision/modeling/factory.py
View file @
45dc706d
...
@@ -175,7 +175,6 @@ def build_qat_retinanet(
...
@@ -175,7 +175,6 @@ def build_qat_retinanet(
clone_function
=
_clone_function_for_fpn
,
clone_function
=
_clone_function_for_fpn
,
)
)
decoder
=
tfmot
.
quantization
.
keras
.
quantize_model
(
decoder
)
decoder
=
tfmot
.
quantization
.
keras
.
quantize_model
(
decoder
)
decoder
=
tfmot
.
quantization
.
keras
.
remove_input_range
(
decoder
)
head
=
model
.
head
head
=
model
.
head
if
quantization
.
quantize_detection_head
:
if
quantization
.
quantize_detection_head
:
...
...
official/projects/qat/vision/modeling/heads/dense_prediction_heads.py
View file @
45dc706d
...
@@ -54,7 +54,7 @@ class SeparableConv2DQuantized(tf.keras.layers.Layer):
...
@@ -54,7 +54,7 @@ class SeparableConv2DQuantized(tf.keras.layers.Layer):
depthwise_conv2d_quantized
=
helper
.
quantize_wrapped_layer
(
depthwise_conv2d_quantized
=
helper
.
quantize_wrapped_layer
(
tf
.
keras
.
layers
.
DepthwiseConv2D
,
tf
.
keras
.
layers
.
DepthwiseConv2D
,
configs
.
Default8BitConvQuantizeConfig
(
configs
.
Default8BitConvQuantizeConfig
(
[
'depthwise_kernel'
],
[],
True
))
[
'depthwise_kernel'
],
[
'activation'
],
True
))
conv2d_quantized
=
helper
.
quantize_wrapped_layer
(
conv2d_quantized
=
helper
.
quantize_wrapped_layer
(
tf
.
keras
.
layers
.
Conv2D
,
tf
.
keras
.
layers
.
Conv2D
,
configs
.
Default8BitConvQuantizeConfig
(
configs
.
Default8BitConvQuantizeConfig
(
...
...
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