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
b63a73df
Unverified
Commit
b63a73df
authored
Nov 21, 2017
by
Neal Wu
Committed by
GitHub
Nov 21, 2017
Browse files
Merge pull request #2849 from cclauss/patch-16
Slim: 3217920L --> 3217920 (drop the trailing L)
parents
1ac9d457
eff8d09d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
research/slim/nets/mobilenet_v1_test.py
research/slim/nets/mobilenet_v1_test.py
+5
-5
No files found.
research/slim/nets/mobilenet_v1_test.py
View file @
b63a73df
...
@@ -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
)
...
@@ -310,7 +310,7 @@ class MobilenetV1Test(tf.test.TestCase):
...
@@ -310,7 +310,7 @@ class MobilenetV1Test(tf.test.TestCase):
mobilenet_v1
.
mobilenet_v1_base
(
inputs
)
mobilenet_v1
.
mobilenet_v1_base
(
inputs
)
total_params
,
_
=
slim
.
model_analyzer
.
analyze_vars
(
total_params
,
_
=
slim
.
model_analyzer
.
analyze_vars
(
slim
.
get_model_variables
())
slim
.
get_model_variables
())
self
.
assertAlmostEqual
(
3217920
L
,
total_params
)
self
.
assertAlmostEqual
(
3217920
,
total_params
)
def
testBuildEndPointsWithDepthMultiplierLessThanOne
(
self
):
def
testBuildEndPointsWithDepthMultiplierLessThanOne
(
self
):
batch_size
=
5
batch_size
=
5
...
...
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