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
6b18b06b
Commit
6b18b06b
authored
Jul 16, 2020
by
Kaushik Shivakumar
Browse files
suggested fixes
parent
06e15650
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
research/object_detection/meta_architectures/context_rcnn_lib_tf2.py
...ject_detection/meta_architectures/context_rcnn_lib_tf2.py
+2
-2
research/object_detection/meta_architectures/context_rcnn_lib_tf2_test.py
...detection/meta_architectures/context_rcnn_lib_tf2_test.py
+1
-1
research/object_detection/meta_architectures/context_rcnn_meta_arch.py
...ct_detection/meta_architectures/context_rcnn_meta_arch.py
+2
-2
No files found.
research/object_detection/meta_architectures/context_rcnn_lib_
v
2.py
→
research/object_detection/meta_architectures/context_rcnn_lib_
tf
2.py
View file @
6b18b06b
...
@@ -18,7 +18,7 @@ from __future__ import absolute_import
...
@@ -18,7 +18,7 @@ from __future__ import absolute_import
from
__future__
import
division
from
__future__
import
division
from
__future__
import
print_function
from
__future__
import
print_function
import
tensorflow
.compat.v1
as
tf
import
tensorflow
as
tf
# The negative value used in padding the invalid weights.
# The negative value used in padding the invalid weights.
_NEGATIVE_PADDING_VALUE
=
-
100000
_NEGATIVE_PADDING_VALUE
=
-
100000
...
@@ -88,7 +88,7 @@ class AttentionBlock(tf.keras.layers.Layer):
...
@@ -88,7 +88,7 @@ class AttentionBlock(tf.keras.layers.Layer):
# box_features becomes [batch_size, max_num_proposals, channels].
# box_features becomes [batch_size, max_num_proposals, channels].
input_features
=
tf
.
reduce_mean
(
input_features
,
[
2
,
3
])
input_features
=
tf
.
reduce_mean
(
input_features
,
[
2
,
3
])
with
tf
.
variabl
e_scope
(
"AttentionBlock"
):
with
tf
.
nam
e_scope
(
"AttentionBlock"
):
queries
=
project_features
(
queries
=
project_features
(
input_features
,
self
.
_bottleneck_dimension
,
self
.
_is_training
,
input_features
,
self
.
_bottleneck_dimension
,
self
.
_is_training
,
self
.
_query_proj
,
normalize
=
True
)
self
.
_query_proj
,
normalize
=
True
)
...
...
research/object_detection/meta_architectures/context_rcnn_lib_tf2_test.py
View file @
6b18b06b
...
@@ -22,7 +22,7 @@ import unittest
...
@@ -22,7 +22,7 @@ import unittest
from
absl.testing
import
parameterized
from
absl.testing
import
parameterized
import
tensorflow.compat.v1
as
tf
import
tensorflow.compat.v1
as
tf
from
object_detection.meta_architectures
import
context_rcnn_lib_
v
2
as
context_rcnn_lib
from
object_detection.meta_architectures
import
context_rcnn_lib_
tf
2
as
context_rcnn_lib
from
object_detection.utils
import
test_case
from
object_detection.utils
import
test_case
from
object_detection.utils
import
tf_version
from
object_detection.utils
import
tf_version
...
...
research/object_detection/meta_architectures/context_rcnn_meta_arch.py
View file @
6b18b06b
...
@@ -27,7 +27,7 @@ import functools
...
@@ -27,7 +27,7 @@ import functools
from
object_detection.core
import
standard_fields
as
fields
from
object_detection.core
import
standard_fields
as
fields
from
object_detection.meta_architectures
import
context_rcnn_lib
from
object_detection.meta_architectures
import
context_rcnn_lib
from
object_detection.meta_architectures
import
context_rcnn_lib_
v
2
from
object_detection.meta_architectures
import
context_rcnn_lib_
tf
2
from
object_detection.meta_architectures
import
faster_rcnn_meta_arch
from
object_detection.meta_architectures
import
faster_rcnn_meta_arch
from
object_detection.utils
import
tf_version
from
object_detection.utils
import
tf_version
...
@@ -272,7 +272,7 @@ class ContextRCNNMetaArch(faster_rcnn_meta_arch.FasterRCNNMetaArch):
...
@@ -272,7 +272,7 @@ class ContextRCNNMetaArch(faster_rcnn_meta_arch.FasterRCNNMetaArch):
attention_temperature
=
attention_temperature
,
attention_temperature
=
attention_temperature
,
is_training
=
is_training
)
is_training
=
is_training
)
else
:
else
:
self
.
_context_feature_extract_fn
=
context_rcnn_lib_
v
2
.
AttentionBlock
(
self
.
_context_feature_extract_fn
=
context_rcnn_lib_
tf
2
.
AttentionBlock
(
bottleneck_dimension
=
attention_bottleneck_dimension
,
bottleneck_dimension
=
attention_bottleneck_dimension
,
attention_temperature
=
attention_temperature
,
attention_temperature
=
attention_temperature
,
freeze_batchnorm
=
freeze_batchnorm
,
freeze_batchnorm
=
freeze_batchnorm
,
...
...
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