






'''simple docstring'''


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


lowerCamelCase_				: int    	=							logging.get_logger(__name__)

lowerCamelCase_				: Tuple    	=							{
    '''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    _SCREAMING_SNAKE_CASE							(		SCREAMING_SNAKE_CASE	):


			'''simple docstring'''





			__a							:							Union[str, Any]					     =					"cvt"






			def __init__(   self							:						List[str] ,      lowercase							:						int=3 ,      lowercase							:						Union[str, Any]=[7, 3, 3] ,      lowercase							:						Optional[Any]=[4, 2, 2] ,      lowercase							:						str=[2, 1, 1] ,      lowercase							:						Tuple=[6_4, 1_9_2, 3_8_4] ,      lowercase							:						Union[str, Any]=[1, 3, 6] ,      lowercase							:						Optional[int]=[1, 2, 1_0] ,      lowercase							:						Dict=[4.0, 4.0, 4.0] ,      lowercase							:						int=[0.0, 0.0, 0.0] ,      lowercase							:						Dict=[0.0, 0.0, 0.0] ,      lowercase							:						Optional[Any]=[0.0, 0.0, 0.1] ,      lowercase							:						Optional[Any]=[True, True, True] ,      lowercase							:						str=[False, False, True] ,      lowercase							:						List[str]=["dw_bn", "dw_bn", "dw_bn"] ,      lowercase							:						Any=[3, 3, 3] ,      lowercase							:						List[Any]=[1, 1, 1] ,      lowercase							:						List[Any]=[2, 2, 2] ,      lowercase							:						List[str]=[1, 1, 1] ,      lowercase							:						Optional[Any]=[1, 1, 1] ,      lowercase							:						int=0.0_2 ,      lowercase							:						Dict=1e-12 ,      **lowercase							:						List[str] ,      )							->    List[str]:

									'''simple docstring'''







									super().__init__(**lowercase			)
									UpperCamelCase__         = num_channels
									UpperCamelCase__         = patch_sizes
									UpperCamelCase__         = patch_stride
									UpperCamelCase__         = patch_padding
									UpperCamelCase__         = embed_dim
									UpperCamelCase__         = num_heads
									UpperCamelCase__         = depth
									UpperCamelCase__         = mlp_ratio
									UpperCamelCase__         = attention_drop_rate
									UpperCamelCase__         = drop_rate
									UpperCamelCase__         = drop_path_rate
									UpperCamelCase__         = qkv_bias
									UpperCamelCase__         = cls_token
									UpperCamelCase__         = qkv_projection_method
									UpperCamelCase__         = kernel_qkv
									UpperCamelCase__         = padding_kv
									UpperCamelCase__         = stride_kv
									UpperCamelCase__         = padding_q
									UpperCamelCase__         = stride_q
									UpperCamelCase__         = initializer_range
									UpperCamelCase__         = layer_norm_eps








'''simple docstring'''


import math







def 	__magic_name__( _A					):
						'''simple docstring'''





						assert isinstance(_A						,      _A					) and (
						    number >= 0
						), "'number' must been an int and positive"

						if 1 < number < 4:
												# 2 and 3 are primes
												return True
						elif number < 2 or not number % 2:
												# Negatives, 0, 1 and all even numbers are not primes
												return False

						UpperCamelCase__         = range(3						,      int(math.sqrt(_A					) + 1					)						,      2					)
						return not any(not number % i for i in odd_numbers					)







def 	__magic_name__( _A						,      _A=1						,      **_A					):
						'''simple docstring'''





						UpperCamelCase__         = factor * value
						UpperCamelCase__         = value

						while not is_prime(_A					):
												value += 1 if not ("desc" in kwargs and kwargs["desc"] is True) else -1

						if value == first_value_val:
												return next_prime(value + 1						,      **_A					)
						return value
