Unverified Commit b63a73df authored by Neal Wu's avatar Neal Wu Committed by GitHub
Browse files

Merge pull request #2849 from cclauss/patch-16

Slim: 3217920L --> 3217920 (drop the trailing L)
parents 1ac9d457 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.iteritems(): 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.iteritems(): 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.iteritems(): 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.iteritems(): 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(3217920L, total_params) self.assertAlmostEqual(3217920, total_params)
def testBuildEndPointsWithDepthMultiplierLessThanOne(self): def testBuildEndPointsWithDepthMultiplierLessThanOne(self):
batch_size = 5 batch_size = 5
......
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