






from string import ascii_uppercase

lowerCamelCase			:					Optional[int]         =	{str(ord(c) - 55): c for c in ascii_uppercase}





def       __lowerCAmelCase      (						__snake_case					, __snake_case       ):
     if isinstance(__snake_case					, __snake_case       ):
          raise TypeError("int() can't convert non-string with explicit base"       )
     if num < 0:
          raise ValueError("parameter must be positive int"       )
     if isinstance(__snake_case					, __snake_case       ):
          raise TypeError("'str' object cannot be interpreted as an integer"       )
     if isinstance(__snake_case					, __snake_case       ):
          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								=					""
     __lowerCAmelCase								=					0
     __lowerCAmelCase								=					0
     while div != 1:
          __lowerCAmelCase			, __lowerCAmelCase								=					divmod(__snake_case					, __snake_case       )
          if base >= 11 and 9 < mod < 36:
               __lowerCAmelCase								=					ALPHABET_VALUES[str(__snake_case       )]
          else:
               __lowerCAmelCase								=					str(__snake_case       )
          new_value += actual_value
          __lowerCAmelCase								=					num // base
          __lowerCAmelCase								=					div
          if div == 0:
               return str(new_value[::-1]       )
          elif div == 1:
               new_value += str(__snake_case       )
               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(1000):
   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


lowerCamelCase			:					int         =	logging.get_logger(__name__)

lowerCamelCase			:					Tuple         =	{
    '''caidas/swin2sr-classicalsr-x2-64''': (
        '''https://huggingface.co/caidas/swin2sr-classicalsr-x2-64/resolve/main/config.json'''
    ),
}



class 							_UpperCamelCase			(a_			):
      snake_case_  =							"""swin2sr"""

      snake_case_  =							{
          """hidden_size""": """embed_dim""",
          """num_attention_heads""": """num_heads""",
          """num_hidden_layers""": """num_layers""",
      }


      def __init__(	self					,						__UpperCamelCase=6_4					,						__UpperCamelCase=1					,						__UpperCamelCase=3					,						__UpperCamelCase=1_8_0					,						__UpperCamelCase=[6, 6, 6, 6, 6, 6]					,						__UpperCamelCase=[6, 6, 6, 6, 6, 6]					,						__UpperCamelCase=8					,						__UpperCamelCase=2.0					,						__UpperCamelCase=True					,						__UpperCamelCase=0.0					,						__UpperCamelCase=0.0					,						__UpperCamelCase=0.1					,						__UpperCamelCase="gelu"					,						__UpperCamelCase=False					,						__UpperCamelCase=0.0_2					,						__UpperCamelCase=1e-5					,						__UpperCamelCase=2					,						__UpperCamelCase=1.0					,						__UpperCamelCase="1conv"					,						__UpperCamelCase="pixelshuffle"					,						**__UpperCamelCase					,						)->	Tuple:
           super().__init__(**__UpperCamelCase	)

           __lowerCAmelCase								=					image_size
           __lowerCAmelCase								=					patch_size
           __lowerCAmelCase								=					num_channels
           __lowerCAmelCase								=					embed_dim
           __lowerCAmelCase								=					depths
           __lowerCAmelCase								=					len(__UpperCamelCase	)
           __lowerCAmelCase								=					num_heads
           __lowerCAmelCase								=					window_size
           __lowerCAmelCase								=					mlp_ratio
           __lowerCAmelCase								=					qkv_bias
           __lowerCAmelCase								=					hidden_dropout_prob
           __lowerCAmelCase								=					attention_probs_dropout_prob
           __lowerCAmelCase								=					drop_path_rate
           __lowerCAmelCase								=					hidden_act
           __lowerCAmelCase								=					use_absolute_embeddings
           __lowerCAmelCase								=					layer_norm_eps
           __lowerCAmelCase								=					initializer_range
           __lowerCAmelCase								=					upscale
           __lowerCAmelCase								=					img_range
           __lowerCAmelCase								=					resi_connection
           __lowerCAmelCase								=					upsampler






