





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


A   : Tuple			=				logging.get_logger(__name__)

A   : Union[str, Any]			=				{
    '''microsoft/swinv2-tiny-patch4-window8-256''': (
        '''https://huggingface.co/microsoft/swinv2-tiny-patch4-window8-256/resolve/main/config.json'''
    ),
}


class   A      (SCREAMING_SNAKE_CASE   ):
			'''simple docstring'''




			__lowerCamelCase     :	Optional[Any]          =   '''swinv2'''

			__lowerCamelCase     :	int          =   {
			    '''num_attention_heads''': '''num_heads''',
			    '''num_hidden_layers''': '''num_layers''',
			}






			def __init__(      self       :   Dict							,     __lowerCAmelCase       :   List[str]=2_24							,     __lowerCAmelCase       :   List[str]=4							,     __lowerCAmelCase       :   Dict=3							,     __lowerCAmelCase       :   str=96							,     __lowerCAmelCase       :   Any=[2, 2, 6, 2]							,     __lowerCAmelCase       :   Dict=[3, 6, 12, 24]							,     __lowerCAmelCase       :   Union[str, Any]=7							,     __lowerCAmelCase       :   List[str]=4.0							,     __lowerCAmelCase       :   Optional[Any]=True							,     __lowerCAmelCase       :   Tuple=0.0							,     __lowerCAmelCase       :   Any=0.0							,     __lowerCAmelCase       :   Any=0.1							,     __lowerCAmelCase       :   Any="gelu"							,     __lowerCAmelCase       :   Tuple=False							,     __lowerCAmelCase       :   Union[str, Any]=0.0_2							,     __lowerCAmelCase       :   Any=1e-5							,     __lowerCAmelCase       :   Tuple=32							,     **__lowerCAmelCase       :   Union[str, Any]							,     )     ->     List[Any]:







					"""simple docstring"""






					super().__init__(**__lowerCAmelCase       )

					A__  				=       image_size
					A__  				=       patch_size
					A__  				=       num_channels
					A__  				=       embed_dim
					A__  				=       depths
					A__  				=       len(__lowerCAmelCase       )
					A__  				=       num_heads
					A__  				=       window_size
					A__  				=       mlp_ratio
					A__  				=       qkv_bias
					A__  				=       hidden_dropout_prob
					A__  				=       attention_probs_dropout_prob
					A__  				=       drop_path_rate
					A__  				=       hidden_act
					A__  				=       use_absolute_embeddings
					A__  				=       layer_norm_eps
					A__  				=       initializer_range
					A__  				=       encoder_stride
					# we set the hidden_size attribute in order to make Swinv2 work with VisionEncoderDecoderModel
					# this indicates the channel dimension after the last stage of the model
					A__  				=       int(embed_dim * 2 ** (len(__lowerCAmelCase       ) - 1)       )
					A__  				=       (0, 0, 0, 0)













from string import ascii_uppercase

A   : List[str]			=				{str(ord(c) - 5_5): c for c in ascii_uppercase}







def        __lowerCamelCase (							__a       :int   ,					__a       :int   )		->    str:






		"""simple docstring"""

		if isinstance(__a   ,					__a   ):
				raise TypeError("""int() can't convert non-string with explicit base"""   )
		if num < 0:
				raise ValueError("""parameter must be positive int"""   )
		if isinstance(__a   ,					__a   ):
				raise TypeError("""'str' object cannot be interpreted as an integer"""   )
		if isinstance(__a   ,					__a   ):
				raise TypeError("""'float' object cannot be interpreted as an integer"""   )
		if base in (0, 1):
				raise ValueError("""base must be >= 2"""   )
		if base > 3_6:
				raise ValueError("""base must be <= 36"""   )
		A__  				=       """"""
		A__  				=       0
		A__  				=       0
		while div != 1:
				A__				,      A__  				=       divmod(__a   ,					__a   )
				if base >= 1_1 and 9 < mod < 3_6:
						A__  				=       ALPHABET_VALUES[str(__a   )]
				else:
						A__  				=       str(__a   )
				new_value += actual_value
				A__  				=       num // base
				A__  				=       div
				if div == 0:
						return str(new_value[::-1]   )
				elif div == 1:
						new_value += str(__a   )
						return str(new_value[::-1]   )

		return new_value[::-1]


if __name__ == "__main__":
					import doctest

					doctest.testmod()

					for base in range(2, 3_7):
										for num in range(1_0_0_0):
															assert int(decimal_to_any(num, base), base) == num, (
															    num,
															    base,
															    decimal_to_any(num, base),
															    int(decimal_to_any(num, base), base),
															)



