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
6a2c9932
"...resnet50_tensorflow.git" did not exist on "5b2575c27308e96ed582886229d847003c2760f0"
Commit
6a2c9932
authored
Jun 19, 2020
by
syiming
Browse files
add unit test for get_proposal_feature_extractor_model smaller input size
parent
d26ef0e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
research/object_detection/models/faster_rcnn_resnet_v1_fpn_keras_feature_extractor_tf2_test.py
...er_rcnn_resnet_v1_fpn_keras_feature_extractor_tf2_test.py
+13
-0
No files found.
research/object_detection/models/faster_rcnn_resnet_v1_fpn_keras_feature_extractor_tf2_test.py
View file @
6a2c9932
...
@@ -53,6 +53,19 @@ class FasterRCNNResnetV1FPNKerasFeatureExtractorTest(tf.test.TestCase):
...
@@ -53,6 +53,19 @@ class FasterRCNNResnetV1FPNKerasFeatureExtractorTest(tf.test.TestCase):
weight_decay
=
0.0
)
weight_decay
=
0.0
)
def
test_extract_proposal_features_returns_expected_size
(
self
):
def
test_extract_proposal_features_returns_expected_size
(
self
):
feature_extractor
=
self
.
_build_feature_extractor
()
preprocessed_inputs
=
tf
.
random_uniform
(
[
2
,
320
,
320
,
3
],
maxval
=
255
,
dtype
=
tf
.
float32
)
rpn_feature_maps
=
feature_extractor
.
get_proposal_feature_extractor_model
(
name
=
'TestScope'
)(
preprocessed_inputs
)
features_shapes
=
[
tf
.
shape
(
rpn_feature_map
)
for
name
,
rpn_feature_map
in
rpn_feature_maps
.
items
()]
self
.
assertAllEqual
(
features_shapes
[
0
].
numpy
(),
[
2
,
40
,
40
,
256
])
self
.
assertAllEqual
(
features_shapes
[
1
].
numpy
(),
[
2
,
20
,
20
,
256
])
self
.
assertAllEqual
(
features_shapes
[
2
].
numpy
(),
[
2
,
10
,
10
,
256
])
def
test_extract_proposal_features_half_size_input
(
self
):
feature_extractor
=
self
.
_build_feature_extractor
()
feature_extractor
=
self
.
_build_feature_extractor
()
preprocessed_inputs
=
tf
.
random_uniform
(
preprocessed_inputs
=
tf
.
random_uniform
(
[
2
,
160
,
160
,
3
],
maxval
=
255
,
dtype
=
tf
.
float32
)
[
2
,
160
,
160
,
3
],
maxval
=
255
,
dtype
=
tf
.
float32
)
...
...
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