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
ff64c849
Commit
ff64c849
authored
Jul 06, 2017
by
Thibaut Mattio
Browse files
Make tests compatible with Python 3
* Change dictionnaries iteritems() to items()
parent
252fffb2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py
...tion/meta_architectures/faster_rcnn_meta_arch_test_lib.py
+1
-1
object_detection/models/feature_map_generators_test.py
object_detection/models/feature_map_generators_test.py
+2
-2
No files found.
object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py
View file @
ff64c849
...
@@ -271,7 +271,7 @@ class FasterRCNNMetaArchTestBase(tf.test.TestCase):
...
@@ -271,7 +271,7 @@ class FasterRCNNMetaArchTestBase(tf.test.TestCase):
self
.
assertEqual
(
set
(
prediction_out
.
keys
()),
expected_output_keys
)
self
.
assertEqual
(
set
(
prediction_out
.
keys
()),
expected_output_keys
)
self
.
assertAllEqual
(
prediction_out
[
'image_shape'
],
input_image_shape
)
self
.
assertAllEqual
(
prediction_out
[
'image_shape'
],
input_image_shape
)
for
output_key
,
expected_shape
in
expected_output_shapes
.
iter
items
():
for
output_key
,
expected_shape
in
expected_output_shapes
.
items
():
self
.
assertAllEqual
(
prediction_out
[
output_key
].
shape
,
expected_shape
)
self
.
assertAllEqual
(
prediction_out
[
output_key
].
shape
,
expected_shape
)
# Check that anchors are clipped to window.
# Check that anchors are clipped to window.
...
...
object_detection/models/feature_map_generators_test.py
View file @
ff64c849
...
@@ -63,7 +63,7 @@ class MultiResolutionFeatureMapGeneratorTest(tf.test.TestCase):
...
@@ -63,7 +63,7 @@ class MultiResolutionFeatureMapGeneratorTest(tf.test.TestCase):
sess
.
run
(
init_op
)
sess
.
run
(
init_op
)
out_feature_maps
=
sess
.
run
(
feature_maps
)
out_feature_maps
=
sess
.
run
(
feature_maps
)
out_feature_map_shapes
=
dict
(
out_feature_map_shapes
=
dict
(
(
key
,
value
.
shape
)
for
key
,
value
in
out_feature_maps
.
iter
items
())
(
key
,
value
.
shape
)
for
key
,
value
in
out_feature_maps
.
items
())
self
.
assertDictEqual
(
out_feature_map_shapes
,
expected_feature_map_shapes
)
self
.
assertDictEqual
(
out_feature_map_shapes
,
expected_feature_map_shapes
)
def
test_get_expected_feature_map_shapes_with_inception_v3
(
self
):
def
test_get_expected_feature_map_shapes_with_inception_v3
(
self
):
...
@@ -93,7 +93,7 @@ class MultiResolutionFeatureMapGeneratorTest(tf.test.TestCase):
...
@@ -93,7 +93,7 @@ class MultiResolutionFeatureMapGeneratorTest(tf.test.TestCase):
sess
.
run
(
init_op
)
sess
.
run
(
init_op
)
out_feature_maps
=
sess
.
run
(
feature_maps
)
out_feature_maps
=
sess
.
run
(
feature_maps
)
out_feature_map_shapes
=
dict
(
out_feature_map_shapes
=
dict
(
(
key
,
value
.
shape
)
for
key
,
value
in
out_feature_maps
.
iter
items
())
(
key
,
value
.
shape
)
for
key
,
value
in
out_feature_maps
.
items
())
self
.
assertDictEqual
(
out_feature_map_shapes
,
expected_feature_map_shapes
)
self
.
assertDictEqual
(
out_feature_map_shapes
,
expected_feature_map_shapes
)
...
...
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