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


UpperCAmelCase__		:     List[Any]     			=      logging.get_logger(__name__)

UpperCAmelCase__		:     Dict     			=      {
    'facebook/s2t-small-librispeech-asr': (
        'https://huggingface.co/facebook/s2t-small-librispeech-asr/resolve/main/config.json'
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech_to_text
}






class UpperCAmelCase   (						SCREAMING_SNAKE_CASE__   ):





   '''simple docstring'''
   __UpperCamelCase		:    Optional[int] 				=    '''speech_to_text'''
   __UpperCamelCase		:    List[str] 				=    ['''past_key_values''']
   __UpperCamelCase		:    str 				=    {'''num_attention_heads''': '''encoder_attention_heads''', '''hidden_size''': '''d_model'''}


   def __init__(					self     :							List[Any]			,			lowerCAmelCase_     :							Dict=1_0_0_0_0			,			lowerCAmelCase_     :							Optional[Any]=1_2			,			lowerCAmelCase_     :							List[str]=2_0_4_8			,			lowerCAmelCase_     :							str=4			,			lowerCAmelCase_     :							List[Any]=6			,			lowerCAmelCase_     :							Union[str, Any]=2_0_4_8			,			lowerCAmelCase_     :							Optional[Any]=4			,			lowerCAmelCase_     :							str=0.0			,			lowerCAmelCase_     :							Optional[int]=0.0			,			lowerCAmelCase_     :							str=True			,			lowerCAmelCase_     :							int=True			,			lowerCAmelCase_     :							Tuple="relu"			,			lowerCAmelCase_     :							Optional[Any]=2_5_6			,			lowerCAmelCase_     :							List[Any]=0.1			,			lowerCAmelCase_     :							Tuple=0.0			,			lowerCAmelCase_     :							str=0.0			,			lowerCAmelCase_     :							Optional[int]=0.02			,			lowerCAmelCase_     :							Any=2			,			lowerCAmelCase_     :							List[Any]=True			,			lowerCAmelCase_     :							Tuple=1			,			lowerCAmelCase_     :							Tuple=0			,			lowerCAmelCase_     :							List[Any]=2			,			lowerCAmelCase_     :							Dict=6_0_0_0			,			lowerCAmelCase_     :							Tuple=1_0_2_4			,			lowerCAmelCase_     :							List[Any]=2			,			lowerCAmelCase_     :							Tuple=(5, 5)			,			lowerCAmelCase_     :							Dict=1_0_2_4			,			lowerCAmelCase_     :							Tuple=8_0			,			lowerCAmelCase_     :							Union[str, Any]=1			,			**lowerCAmelCase_     :							Dict			,			):

      """simple docstring"""
      _A:  str					=       vocab_size
      _A:  List[Any]					=       d_model
      _A:  str					=       encoder_ffn_dim
      _A:  Dict					=       encoder_layers
      _A:  Union[str, Any]					=       encoder_attention_heads
      _A:  int					=       decoder_ffn_dim
      _A:  List[str]					=       decoder_layers
      _A:  List[str]					=       decoder_attention_heads
      _A:  Dict					=       dropout
      _A:  Tuple					=       attention_dropout
      _A:  Dict					=       activation_dropout
      _A:  Optional[Any]					=       activation_function
      _A:  str					=       init_std
      _A:  str					=       encoder_layerdrop
      _A:  Union[str, Any]					=       decoder_layerdrop
      _A:  Union[str, Any]					=       use_cache
      _A:  Dict					=       encoder_layers
      _A:  List[str]					=       scale_embedding  # scale factor will be sqrt(d_model) if True
      _A:  Union[str, Any]					=       max_source_positions
      _A:  Any					=       max_target_positions
      _A:  Optional[Any]					=       num_conv_layers
      _A:  Tuple					=       list(lowerCAmelCase_     )
      _A:  int					=       conv_channels
      _A:  int					=       input_feat_per_channel
      _A:  Any					=       input_channels

      if len(self.conv_kernel_sizes     ) != self.num_conv_layers:
         raise ValueError(
             '''Configuration for convolutional module is incorrect. '''
             '''It is required that `len(config.conv_kernel_sizes)` == `config.num_conv_layers` '''
             F"""but is `len(config.conv_kernel_sizes) = {len(self.conv_kernel_sizes     )}`, """
             F"""`config.num_conv_layers = {self.num_conv_layers}`."""     )

      super().__init__(
          pad_token_id=lowerCAmelCase_			,			bos_token_id=lowerCAmelCase_			,			eos_token_id=lowerCAmelCase_			,			is_encoder_decoder=lowerCAmelCase_			,			decoder_start_token_id=lowerCAmelCase_			,			**lowerCAmelCase_			,			)





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


UpperCAmelCase__		:     Dict     			=      logging.get_logger(__name__)

UpperCAmelCase__		:     Union[str, Any]     			=      {
    'caidas/swin2sr-classicalsr-x2-64': (
        'https://huggingface.co/caidas/swin2sr-classicalsr-x2-64/resolve/main/config.json'
    ),
}






class UpperCAmelCase   (						SCREAMING_SNAKE_CASE__   ):





   '''simple docstring'''
   __UpperCamelCase		:    Dict 				=    '''swin2sr'''

   __UpperCamelCase		:    str 				=    {
       '''hidden_size''': '''embed_dim''',
       '''num_attention_heads''': '''num_heads''',
       '''num_hidden_layers''': '''num_layers''',
   }


   def __init__(					self     :							List[str]			,			lowerCAmelCase_     :							int=6_4			,			lowerCAmelCase_     :							Optional[Any]=1			,			lowerCAmelCase_     :							Dict=3			,			lowerCAmelCase_     :							Dict=1_8_0			,			lowerCAmelCase_     :							Union[str, Any]=[6, 6, 6, 6, 6, 6]			,			lowerCAmelCase_     :							Tuple=[6, 6, 6, 6, 6, 6]			,			lowerCAmelCase_     :							int=8			,			lowerCAmelCase_     :							Any=2.0			,			lowerCAmelCase_     :							Union[str, Any]=True			,			lowerCAmelCase_     :							Dict=0.0			,			lowerCAmelCase_     :							Optional[int]=0.0			,			lowerCAmelCase_     :							int=0.1			,			lowerCAmelCase_     :							Any="gelu"			,			lowerCAmelCase_     :							List[str]=False			,			lowerCAmelCase_     :							str=0.02			,			lowerCAmelCase_     :							Optional[Any]=1e-5			,			lowerCAmelCase_     :							int=2			,			lowerCAmelCase_     :							int=1.0			,			lowerCAmelCase_     :							Any="1conv"			,			lowerCAmelCase_     :							List[str]="pixelshuffle"			,			**lowerCAmelCase_     :							str			,			):

      """simple docstring"""
      super().__init__(**lowerCAmelCase_     )

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



