





from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase_							=				logging.get_logger(__name__)

UpperCAmelCase_							=				{
    '''microsoft/cvt-13''': '''https://huggingface.co/microsoft/cvt-13/resolve/main/config.json''',
    # See all Cvt models at https://huggingface.co/models?filter=cvt
}
class     UpperCamelCase__					(     __lowerCAmelCase				):






		'''simple docstring'''






		__a       :       int       =	'''cvt'''






		def __init__(							self,   snake_case__=3,   snake_case__=[7, 3, 3],   snake_case__=[4, 2, 2],   snake_case__=[2, 1, 1],   snake_case__=[64, 1_92, 3_84],   snake_case__=[1, 3, 6],   snake_case__=[1, 2, 10],   snake_case__=[4.0, 4.0, 4.0],   snake_case__=[0.0, 0.0, 0.0],   snake_case__=[0.0, 0.0, 0.0],   snake_case__=[0.0, 0.0, 0.1],   snake_case__=[True, True, True],   snake_case__=[False, False, True],   snake_case__=["dw_bn", "dw_bn", "dw_bn"],   snake_case__=[3, 3, 3],   snake_case__=[1, 1, 1],   snake_case__=[2, 2, 2],   snake_case__=[1, 1, 1],   snake_case__=[1, 1, 1],   snake_case__=0.02,   snake_case__=1E-12,   **snake_case__,   )       -> int:






									"""simple docstring"""
									super().__init__(**__SCREAMING_SNAKE_CASE  )
									lowercase_	:   List[Any]  				=     num_channels
									lowercase_	:   str  				=     patch_sizes
									lowercase_	:   Tuple  				=     patch_stride
									lowercase_	:   Optional[Any]  				=     patch_padding
									lowercase_	:   Tuple  				=     embed_dim
									lowercase_	:   Tuple  				=     num_heads
									lowercase_	:   Tuple  				=     depth
									lowercase_	:   Union[str, Any]  				=     mlp_ratio
									lowercase_	:   Union[str, Any]  				=     attention_drop_rate
									lowercase_	:   int  				=     drop_rate
									lowercase_	:   Tuple  				=     drop_path_rate
									lowercase_	:   Dict  				=     qkv_bias
									lowercase_	:   int  				=     cls_token
									lowercase_	:   str  				=     qkv_projection_method
									lowercase_	:   str  				=     kernel_qkv
									lowercase_	:   Optional[Any]  				=     padding_kv
									lowercase_	:   Optional[Any]  				=     stride_kv
									lowercase_	:   List[str]  				=     padding_q
									lowercase_	:   List[Any]  				=     stride_q
									lowercase_	:   Tuple  				=     initializer_range
									lowercase_	:   Any  				=     layer_norm_eps





'''simple docstring'''



def       _UpperCamelCase			(_lowerCamelCase				:  int						)-> int:




     '''simple docstring'''





     __snake_case            =	abs(_lowerCamelCase						)
     __snake_case            =	0
     while n > 0:
          res += n % 10
          n //= 10
     return res







def       _UpperCamelCase			(_lowerCamelCase				:  int						)-> int:




     '''simple docstring'''





     __snake_case            =	abs(_lowerCamelCase						)
     return n if n < 10 else n % 10 + sum_of_digits(n // 10						)







def       _UpperCamelCase			(_lowerCamelCase				:  int						)-> int:




     '''simple docstring'''





     return sum(int(_lowerCamelCase						) for c in str(abs(_lowerCamelCase						)						)						)







def       _UpperCamelCase			()-> None:




     '''simple docstring'''





     from collections.abc import Callable
     from timeit import timeit

     def benchmark_a_function(_lowerCamelCase				:  Callable ,						_lowerCamelCase				:  int						) -> None:
          __snake_case            =	f'''{func.__name__}({value})'''
          __snake_case            =	timeit(f'''__main__.{call}''' ,						setup='''import __main__'''						)
          print(f'''{call:56} = {func(_lowerCamelCase						)} -- {timing:.4f} seconds'''						)

     for value in (26_21_44, 11_25_89_99_06_84_26_24, 1_26_76_50_60_02_28_22_94_01_49_67_03_20_53_76):
          for func in (sum_of_digits, sum_of_digits_recursion, sum_of_digits_compact):
               benchmark_a_function(_lowerCamelCase ,						_lowerCamelCase						)
          print()


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     benchmark()






