





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


__UpperCAmelCase       :   Dict				       =							logging.get_logger(__name__)

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







class     __snake_case       (							UpperCamelCase__			):





       '''simple docstring'''







       lowerCAmelCase__      		=     """swin2sr"""

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




       def __init__(  self :    Any							,				A :    Optional[Any]=64							,				A :    Any=1							,				A :    List[str]=3							,				A :    List[str]=180							,				A :    List[Any]=[6, 6, 6, 6, 6, 6]							,				A :    List[str]=[6, 6, 6, 6, 6, 6]							,				A :    Tuple=8							,				A :    Optional[int]=2.0							,				A :    Tuple=True							,				A :    List[str]=0.0							,				A :    Optional[int]=0.0							,				A :    List[Any]=0.1							,				A :    Any="gelu"							,				A :    Dict=False							,				A :    List[str]=0.02							,				A :    Any=1E-5							,				A :    Any=2							,				A :    Union[str, Any]=1.0							,				A :    Tuple="1conv"							,				A :    Optional[Any]="pixelshuffle"							,				**A :    Optional[int]							,				):
         super().__init__(**lowerCAmelCase__		)

         __snake_case:						Optional[Any]   =						image_size
         __snake_case:						Dict   =						patch_size
         __snake_case:						Tuple   =						num_channels
         __snake_case:						Union[str, Any]   =						embed_dim
         __snake_case:						Optional[Any]   =						depths
         __snake_case:						List[str]   =						len(lowerCAmelCase__		)
         __snake_case:						Any   =						num_heads
         __snake_case:						Any   =						window_size
         __snake_case:						str   =						mlp_ratio
         __snake_case:						List[str]   =						qkv_bias
         __snake_case:						Dict   =						hidden_dropout_prob
         __snake_case:						List[str]   =						attention_probs_dropout_prob
         __snake_case:						Dict   =						drop_path_rate
         __snake_case:						Optional[Any]   =						hidden_act
         __snake_case:						Union[str, Any]   =						use_absolute_embeddings
         __snake_case:						Optional[Any]   =						layer_norm_eps
         __snake_case:						List[Any]   =						initializer_range
         __snake_case:						int   =						upscale
         __snake_case:						Optional[int]   =						img_range
         __snake_case:						Any   =						resi_connection
         __snake_case:						Optional[Any]   =						upsampler













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


UpperCAmelCase	:	Optional[Any]		     =       logging.get_logger(__name__)

UpperCAmelCase	:	Optional[int]		     =       {
    """google/canine-s""": """https://huggingface.co/google/canine-s/resolve/main/config.json""",
    # See all CANINE models at https://huggingface.co/models?filter=canine
}







class 				__lowerCAmelCase       (    UpperCamelCase__):
      _lowercase				:					List[Any]						=			"""canine"""







      def __init__(    self		,      lowerCAmelCase__=7_6_8		,      lowerCAmelCase__=1_2		,      lowerCAmelCase__=1_2		,      lowerCAmelCase__=3_0_7_2		,      lowerCAmelCase__="gelu"		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__=1_6_3_8_4		,      lowerCAmelCase__=1_6		,      lowerCAmelCase__=0.02		,      lowerCAmelCase__=1E-12		,      lowerCAmelCase__=0		,      lowerCAmelCase__=0XE0_00		,      lowerCAmelCase__=0XE0_01		,      lowerCAmelCase__=4		,      lowerCAmelCase__=4		,      lowerCAmelCase__=8		,      lowerCAmelCase__=1_6_3_8_4		,      lowerCAmelCase__=1_2_8		,      **lowerCAmelCase__		,      )   ->						Dict:



        '''simple docstring'''




        super().__init__(pad_token_id=lowerCAmelCase__		,      bos_token_id=lowerCAmelCase__		,      eos_token_id=lowerCAmelCase__		,      **lowerCAmelCase__							)

        a__	:					Optional[int]										=max_position_embeddings
        a__	:					str										=hidden_size
        a__	:					Optional[Any]										=num_hidden_layers
        a__	:					Tuple										=num_attention_heads
        a__	:					Optional[Any]										=intermediate_size
        a__	:					Optional[int]										=hidden_act
        a__	:					List[Any]										=hidden_dropout_prob
        a__	:					Union[str, Any]										=attention_probs_dropout_prob
        a__	:					Optional[Any]										=initializer_range
        a__	:					Union[str, Any]										=type_vocab_size
        a__	:					Optional[int]										=layer_norm_eps

        # Character config:
        a__	:					int										=downsampling_rate
        a__	:					Optional[Any]										=upsampling_kernel_size
        a__	:					Union[str, Any]										=num_hash_functions
        a__	:					Any										=num_hash_buckets
        a__	:					int										=local_transformer_stride






