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
8b6a4628
"docs/developer_guide/setup_github_runner.md" did not exist on "6aaeb84872f096df1b4ed78cbe6ba5ef8435f5ed"
Commit
8b6a4628
authored
Jul 23, 2020
by
Kaushik Shivakumar
Browse files
finalize context rcnn tf2 support
parent
6d39f5e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
research/object_detection/meta_architectures/context_rcnn_lib_tf2.py
...ject_detection/meta_architectures/context_rcnn_lib_tf2.py
+9
-10
No files found.
research/object_detection/meta_architectures/context_rcnn_lib_tf2.py
View file @
8b6a4628
...
...
@@ -73,16 +73,15 @@ class AttentionBlock(tf.keras.layers.Layer):
# box_features becomes [batch_size, max_num_proposals, channels].
box_features
=
tf
.
reduce_mean
(
box_features
,
[
2
,
3
])
with
tf
.
name_scope
(
"AttentionBlock"
):
queries
=
project_features
(
box_features
,
self
.
_bottleneck_dimension
,
self
.
_is_training
,
self
.
_query_proj
,
normalize
=
True
)
keys
=
project_features
(
context_features
,
self
.
_bottleneck_dimension
,
self
.
_is_training
,
self
.
_key_proj
,
normalize
=
True
)
values
=
project_features
(
context_features
,
self
.
_bottleneck_dimension
,
self
.
_is_training
,
self
.
_val_proj
,
normalize
=
True
)
queries
=
project_features
(
box_features
,
self
.
_bottleneck_dimension
,
self
.
_is_training
,
self
.
_query_proj
,
normalize
=
True
)
keys
=
project_features
(
context_features
,
self
.
_bottleneck_dimension
,
self
.
_is_training
,
self
.
_key_proj
,
normalize
=
True
)
values
=
project_features
(
context_features
,
self
.
_bottleneck_dimension
,
self
.
_is_training
,
self
.
_val_proj
,
normalize
=
True
)
weights
=
tf
.
matmul
(
queries
,
keys
,
transpose_b
=
True
)
weights
,
values
=
filter_weight_value
(
weights
,
values
,
valid_mask
)
...
...
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