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
df15a276
Commit
df15a276
authored
Jan 22, 2020
by
Taylor Robie
Committed by
A. Unique TensorFlower
Jan 22, 2020
Browse files
Use public endpoints for trainable in BatchNormRelu.
PiperOrigin-RevId: 291081423
parent
5ed215b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
official/vision/detection/modeling/architecture/nn_ops.py
official/vision/detection/modeling/architecture/nn_ops.py
+2
-2
No files found.
official/vision/detection/modeling/architecture/nn_ops.py
View file @
df15a276
...
...
@@ -48,8 +48,8 @@ class BatchNormRelu(tf.keras.layers.Layer):
fused: `bool` fused option in batch normalziation.
name: `str` name for the operation.
"""
super
(
BatchNormRelu
,
self
).
__init__
(
trainable
=
trainable
)
self
.
_use_relu
=
relu
self
.
_trainable
=
trainable
if
init_zero
:
gamma_initializer
=
tf
.
keras
.
initializers
.
Zeros
()
else
:
...
...
@@ -76,7 +76,7 @@ class BatchNormRelu(tf.keras.layers.Layer):
"""
# We will need to keep training=None by default, so that it can be inherit
# from keras.Model.training
if
is_training
and
self
.
_
trainable
:
if
is_training
and
self
.
trainable
:
is_training
=
True
inputs
=
self
.
_batch_norm_op
(
inputs
,
training
=
is_training
)
...
...
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