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
c8348887
Commit
c8348887
authored
Jun 16, 2021
by
Scott Zhu
Committed by
TF Object Detection Team
Jun 16, 2021
Browse files
Update object_detection lib to use public TF API.
PiperOrigin-RevId: 379828181
parent
af88596a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
research/object_detection/model_lib.py
research/object_detection/model_lib.py
+1
-2
No files found.
research/object_detection/model_lib.py
View file @
c8348887
...
...
@@ -448,9 +448,8 @@ def create_model_fn(detection_model_fn, configs, hparams=None, use_tpu=False,
tf
.
keras
.
backend
.
set_learning_phase
(
is_training
)
# Set policy for mixed-precision training with Keras-based models.
if
use_tpu
and
train_config
.
use_bfloat16
:
from
tensorflow.python.keras.engine
import
base_layer_utils
# pylint: disable=g-import-not-at-top
# Enable v2 behavior, as `mixed_bfloat16` is only supported in TF 2.0.
base_layer_util
s
.
enable_v2_dtype_behavior
()
tf
.
keras
.
layer
s
.
enable_v2_dtype_behavior
()
tf2
.
keras
.
mixed_precision
.
set_global_policy
(
'mixed_bfloat16'
)
detection_model
=
detection_model_fn
(
is_training
=
is_training
,
add_summaries
=
(
not
use_tpu
))
...
...
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