import tensorflow as tf

                                 expected_shape)
        self.assertItemsEqual(endpoints_shapes.keys(),
                              explicit_padding_end_points.keys())
        for endpoint_name, expected_shape in endpoints_shapes.items():
            self.assertTrue(endpoint_name in explicit_padding_end_points)
            self.assertListEqual(
                explicit_padding_end_points[endpoint_name].get_shape().as_list(),
                expected_shape)

    def testOutputStride16BuildAndCheckAllEndPointsUptoConv2d_13(self):
        batch_size = 5
        height, width = 224, 224
        output_stride = 16

        inputs = tf.random_uniform((batch_size, height, width, 3))
        with slim.arg_scope([slim.conv2d, slim.separable_conv2d],
                            normalizer_fn=slim.batch_norm):
            _, end_points = mobilenet_v1.mobilenet_v1_base(
                inputs, output_stride=output_stride,
                final_endpoint='Conv2d_13_pointwise')
            _, explicit_padding_end_points = mobilenet_v1.mobilenet_v1_base(
                inputs, output_stride=output_stride,
                final_endpoint='Conv2d_13_pointwise', use_explicit_padding=True)
        endpoints_shapes = {'Conv2d_0': [batch_size, 112, 112, 32],
                            'Conv2d_1_depthwise': [batch_size, 112, 112, 32],
                            'Conv2d_1_pointwise': [batch_size, 112, 112, 64],
                            'Conv2d_2_depthwise': [batch_size, 56, 56, 64],
                            'Conv2d_2_pointwise': [batch_size, 56, 56, 128],
