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
ea5fc64d
Commit
ea5fc64d
authored
Aug 17, 2020
by
TF Object Detection Team
Browse files
Merge pull request #9120 from kmindspark:context_tf2_fix
PiperOrigin-RevId: 327114257
parents
381dd9fe
859b92b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
research/object_detection/meta_architectures/context_rcnn_lib_tf2.py
...ject_detection/meta_architectures/context_rcnn_lib_tf2.py
+2
-2
No files found.
research/object_detection/meta_architectures/context_rcnn_lib_tf2.py
View file @
ea5fc64d
...
...
@@ -33,7 +33,6 @@ class ContextProjection(tf.keras.layers.Layer):
momentum
=
0.97
,
trainable
=
True
)
self
.
projection
=
tf
.
keras
.
layers
.
Dense
(
units
=
projection_dimension
,
activation
=
tf
.
nn
.
relu6
,
use_bias
=
True
)
self
.
projection_dimension
=
projection_dimension
super
(
ContextProjection
,
self
).
__init__
(
**
kwargs
)
...
...
@@ -43,7 +42,8 @@ class ContextProjection(tf.keras.layers.Layer):
self
.
batch_norm
.
build
(
input_shape
[:
1
]
+
[
self
.
projection_dimension
])
def
call
(
self
,
input_features
,
is_training
=
False
):
return
self
.
batch_norm
(
self
.
projection
(
input_features
),
is_training
)
return
tf
.
nn
.
relu6
(
self
.
batch_norm
(
self
.
projection
(
input_features
),
is_training
))
class
AttentionBlock
(
tf
.
keras
.
layers
.
Layer
):
...
...
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