Commit 6b18b06b authored by Kaushik Shivakumar's avatar Kaushik Shivakumar
Browse files

suggested fixes

parent 06e15650
......@@ -18,7 +18,7 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.compat.v1 as tf
import tensorflow as tf
# The negative value used in padding the invalid weights.
_NEGATIVE_PADDING_VALUE = -100000
......@@ -88,7 +88,7 @@ class AttentionBlock(tf.keras.layers.Layer):
# box_features becomes [batch_size, max_num_proposals, channels].
input_features = tf.reduce_mean(input_features, [2, 3])
with tf.variable_scope("AttentionBlock"):
with tf.name_scope("AttentionBlock"):
queries = project_features(
input_features, self._bottleneck_dimension, self._is_training,
self._query_proj, normalize=True)
......
......@@ -22,7 +22,7 @@ import unittest
from absl.testing import parameterized
import tensorflow.compat.v1 as tf
from object_detection.meta_architectures import context_rcnn_lib_v2 as context_rcnn_lib
from object_detection.meta_architectures import context_rcnn_lib_tf2 as context_rcnn_lib
from object_detection.utils import test_case
from object_detection.utils import tf_version
......
......@@ -27,7 +27,7 @@ import functools
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_v2
from object_detection.meta_architectures import context_rcnn_lib_tf2
from object_detection.meta_architectures import faster_rcnn_meta_arch
from object_detection.utils import tf_version
......@@ -272,7 +272,7 @@ class ContextRCNNMetaArch(faster_rcnn_meta_arch.FasterRCNNMetaArch):
attention_temperature=attention_temperature,
is_training=is_training)
else:
self._context_feature_extract_fn = context_rcnn_lib_v2.AttentionBlock(
self._context_feature_extract_fn = context_rcnn_lib_tf2.AttentionBlock(
bottleneck_dimension=attention_bottleneck_dimension,
attention_temperature=attention_temperature,
freeze_batchnorm=freeze_batchnorm,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment