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
eff8d09d
Unverified
Commit
eff8d09d
authored
Nov 21, 2017
by
Neal Wu
Committed by
GitHub
Nov 21, 2017
Browse files
Replace iteritems() with items() for Python 3 compatibility
parent
6ca65b7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
research/slim/nets/mobilenet_v1_test.py
research/slim/nets/mobilenet_v1_test.py
+4
-4
No files found.
research/slim/nets/mobilenet_v1_test.py
View file @
eff8d09d
...
@@ -165,7 +165,7 @@ class MobilenetV1Test(tf.test.TestCase):
...
@@ -165,7 +165,7 @@ class MobilenetV1Test(tf.test.TestCase):
'Conv2d_13_depthwise'
:
[
batch_size
,
7
,
7
,
1024
],
'Conv2d_13_depthwise'
:
[
batch_size
,
7
,
7
,
1024
],
'Conv2d_13_pointwise'
:
[
batch_size
,
7
,
7
,
1024
]}
'Conv2d_13_pointwise'
:
[
batch_size
,
7
,
7
,
1024
]}
self
.
assertItemsEqual
(
endpoints_shapes
.
keys
(),
end_points
.
keys
())
self
.
assertItemsEqual
(
endpoints_shapes
.
keys
(),
end_points
.
keys
())
for
endpoint_name
,
expected_shape
in
endpoints_shapes
.
iter
items
():
for
endpoint_name
,
expected_shape
in
endpoints_shapes
.
items
():
self
.
assertTrue
(
endpoint_name
in
end_points
)
self
.
assertTrue
(
endpoint_name
in
end_points
)
self
.
assertListEqual
(
end_points
[
endpoint_name
].
get_shape
().
as_list
(),
self
.
assertListEqual
(
end_points
[
endpoint_name
].
get_shape
().
as_list
(),
expected_shape
)
expected_shape
)
...
@@ -209,7 +209,7 @@ class MobilenetV1Test(tf.test.TestCase):
...
@@ -209,7 +209,7 @@ class MobilenetV1Test(tf.test.TestCase):
'Conv2d_13_depthwise'
:
[
batch_size
,
14
,
14
,
1024
],
'Conv2d_13_depthwise'
:
[
batch_size
,
14
,
14
,
1024
],
'Conv2d_13_pointwise'
:
[
batch_size
,
14
,
14
,
1024
]}
'Conv2d_13_pointwise'
:
[
batch_size
,
14
,
14
,
1024
]}
self
.
assertItemsEqual
(
endpoints_shapes
.
keys
(),
end_points
.
keys
())
self
.
assertItemsEqual
(
endpoints_shapes
.
keys
(),
end_points
.
keys
())
for
endpoint_name
,
expected_shape
in
endpoints_shapes
.
iter
items
():
for
endpoint_name
,
expected_shape
in
endpoints_shapes
.
items
():
self
.
assertTrue
(
endpoint_name
in
end_points
)
self
.
assertTrue
(
endpoint_name
in
end_points
)
self
.
assertListEqual
(
end_points
[
endpoint_name
].
get_shape
().
as_list
(),
self
.
assertListEqual
(
end_points
[
endpoint_name
].
get_shape
().
as_list
(),
expected_shape
)
expected_shape
)
...
@@ -253,7 +253,7 @@ class MobilenetV1Test(tf.test.TestCase):
...
@@ -253,7 +253,7 @@ class MobilenetV1Test(tf.test.TestCase):
'Conv2d_13_depthwise'
:
[
batch_size
,
28
,
28
,
1024
],
'Conv2d_13_depthwise'
:
[
batch_size
,
28
,
28
,
1024
],
'Conv2d_13_pointwise'
:
[
batch_size
,
28
,
28
,
1024
]}
'Conv2d_13_pointwise'
:
[
batch_size
,
28
,
28
,
1024
]}
self
.
assertItemsEqual
(
endpoints_shapes
.
keys
(),
end_points
.
keys
())
self
.
assertItemsEqual
(
endpoints_shapes
.
keys
(),
end_points
.
keys
())
for
endpoint_name
,
expected_shape
in
endpoints_shapes
.
iter
items
():
for
endpoint_name
,
expected_shape
in
endpoints_shapes
.
items
():
self
.
assertTrue
(
endpoint_name
in
end_points
)
self
.
assertTrue
(
endpoint_name
in
end_points
)
self
.
assertListEqual
(
end_points
[
endpoint_name
].
get_shape
().
as_list
(),
self
.
assertListEqual
(
end_points
[
endpoint_name
].
get_shape
().
as_list
(),
expected_shape
)
expected_shape
)
...
@@ -296,7 +296,7 @@ class MobilenetV1Test(tf.test.TestCase):
...
@@ -296,7 +296,7 @@ class MobilenetV1Test(tf.test.TestCase):
'Conv2d_13_depthwise'
:
[
batch_size
,
4
,
4
,
768
],
'Conv2d_13_depthwise'
:
[
batch_size
,
4
,
4
,
768
],
'Conv2d_13_pointwise'
:
[
batch_size
,
4
,
4
,
768
]}
'Conv2d_13_pointwise'
:
[
batch_size
,
4
,
4
,
768
]}
self
.
assertItemsEqual
(
endpoints_shapes
.
keys
(),
end_points
.
keys
())
self
.
assertItemsEqual
(
endpoints_shapes
.
keys
(),
end_points
.
keys
())
for
endpoint_name
,
expected_shape
in
endpoints_shapes
.
iter
items
():
for
endpoint_name
,
expected_shape
in
endpoints_shapes
.
items
():
self
.
assertTrue
(
endpoint_name
in
end_points
)
self
.
assertTrue
(
endpoint_name
in
end_points
)
self
.
assertListEqual
(
end_points
[
endpoint_name
].
get_shape
().
as_list
(),
self
.
assertListEqual
(
end_points
[
endpoint_name
].
get_shape
().
as_list
(),
expected_shape
)
expected_shape
)
...
...
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