





from string import ascii_uppercase

_UpperCAmelCase				:       List[str]	   =				{str(ord(c) - 55): c for c in ascii_uppercase}


def        SCREAMING_SNAKE_CASE      (       _UpperCAmelCase						,	_UpperCAmelCase )			->     str:
    if isinstance(_UpperCAmelCase						,	_UpperCAmelCase ):
        raise TypeError('int() can\'t convert non-string with explicit base' )
    if num < 0:
        raise ValueError('parameter must be positive int' )
    if isinstance(_UpperCAmelCase						,	_UpperCAmelCase ):
        raise TypeError('\'str\' object cannot be interpreted as an integer' )
    if isinstance(_UpperCAmelCase						,	_UpperCAmelCase ):
        raise TypeError('\'float\' object cannot be interpreted as an integer' )
    if base in (0, 1):
        raise ValueError('base must be >= 2' )
    if base > 36:
        raise ValueError('base must be <= 36' )
    lowerCamelCase__    :      Optional[Any]					 =		''
    lowerCamelCase__    :      List[str]					 =		0
    lowerCamelCase__    :      Dict					 =		0
    while div != 1:
        lowerCamelCase__ ,							lowerCamelCase__    :      List[str]					 =		divmod(_UpperCAmelCase						,	_UpperCAmelCase )
        if base >= 11 and 9 < mod < 36:
            lowerCamelCase__    :      Dict					 =		ALPHABET_VALUES[str(_UpperCAmelCase )]
        else:
            lowerCamelCase__    :      int					 =		str(_UpperCAmelCase )
        new_value += actual_value
        lowerCamelCase__    :      List[Any]					 =		num // base
        lowerCamelCase__    :      Optional[int]					 =		div
        if div == 0:
            return str(new_value[::-1] )
        elif div == 1:
            new_value += str(_UpperCAmelCase )
            return str(new_value[::-1] )

    return new_value[::-1]


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    for base in range(2, 37):
        for num in range(10_00):
            assert int(decimal_to_any(num, base), base) == num, (
                num,
                base,
                decimal_to_any(num, base),
                int(decimal_to_any(num, base), base),
            )












from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


__lowerCamelCase       :     str   =     logging.get_logger(__name__)

__lowerCamelCase       :     str   =     {
    """facebook/convnextv2-tiny-1k-224""": """https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json""",
}



class 					A__   (       __snake_case       ,   __snake_case			):
      _UpperCAmelCase	:Optional[int]						    =   'convnextv2'





      def __init__( self       ,							A_=3       ,							A_=4       ,							A_=4       ,							A_=None       ,							A_=None       ,							A_="gelu"       ,							A_=0.02       ,							A_=1e-12       ,							A_=0.0       ,							A_=224       ,							A_=None       ,							A_=None       ,							**A_       ,							):
       '''simple docstring'''




       super().__init__(**A_   )

       UpperCamelCase	:					Dict       	=   num_channels
       UpperCamelCase	:					Union[str, Any]       	=   patch_size
       UpperCamelCase	:					Union[str, Any]       	=   num_stages
       UpperCamelCase	:					List[Any]       	=   [96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
       UpperCamelCase	:					List[str]       	=   [3, 3, 9, 3] if depths is None else depths
       UpperCamelCase	:					Dict       	=   hidden_act
       UpperCamelCase	:					Union[str, Any]       	=   initializer_range
       UpperCamelCase	:					Tuple       	=   layer_norm_eps
       UpperCamelCase	:					str       	=   drop_path_rate
       UpperCamelCase	:					List[str]       	=   image_size
       UpperCamelCase	:					List[str]       	=   ["stem"] + [F"""stage{idx}""" for idx in range(1       ,							len(self.depths   ) + 1   )]
       UpperCamelCase	,    UpperCamelCase	:					str       	=   get_aligned_output_features_output_indices(
           out_features=A_       ,							out_indices=A_       ,							stage_names=self.stage_names   )
