def test_get_strides_residual_connection(self):
        self.assertEqual(
            (1, 1),
            mobile_search_space_v3.get_strides(
                mobile_search_space_v3.ResidualSpec(basic_specs.ZeroSpec())))

        with self.assertRaisesRegex(ValueError,
                                    'Residual layer must have stride 1'):
            mobile_search_space_v3.get_strides(
                mobile_search_space_v3.ResidualSpec(
                    mobile_search_space_v3.GlobalAveragePoolSpec()))
 def test_get_strides_global_avg_pool(self):
     self.assertEqual((None, None),
                      mobile_search_space_v3.get_strides(
                          mobile_search_space_v3.GlobalAveragePoolSpec()))