





"""simple docstring"""







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


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

a__      :	Optional[Any]       				=      {
    'facebook/s2t-wav2vec2-large-en-de': (
        'https://huggingface.co/facebook/s2t-wav2vec2-large-en-de/resolve/main/config.json'
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech2text2
}




class __magic_name__   (       A__		):
       UpperCamelCase    :						Optional[int]      =	"speech_to_text_2"
       UpperCamelCase    :						Tuple      =	["past_key_values"]
       UpperCamelCase    :						Union[str, Any]      =	{"num_attention_heads": "decoder_attention_heads", "hidden_size": "d_model"}
       def __init__(     self   ,  __magic_name__=1_0_0_0_0   ,  __magic_name__=6   ,  __magic_name__=2_0_4_8   ,  __magic_name__=4   ,  __magic_name__=0.0   ,  __magic_name__=True   ,  __magic_name__="relu"   ,  __magic_name__=2_5_6   ,  __magic_name__=0.1   ,  __magic_name__=0.0   ,  __magic_name__=0.0   ,  __magic_name__=0.02   ,  __magic_name__=2   ,  __magic_name__=True   ,  __magic_name__=1   ,  __magic_name__=0   ,  __magic_name__=2   ,  __magic_name__=1_0_2_4   ,  **__magic_name__   ,  ):





         """simple docstring"""


         _lowerCAmelCase	      =					vocab_size
         _lowerCAmelCase	      =					d_model
         _lowerCAmelCase	      =					decoder_ffn_dim
         _lowerCAmelCase	      =					decoder_layers
         _lowerCAmelCase	      =					decoder_attention_heads
         _lowerCAmelCase	      =					dropout
         _lowerCAmelCase	      =					attention_dropout
         _lowerCAmelCase	      =					activation_dropout
         _lowerCAmelCase	      =					activation_function
         _lowerCAmelCase	      =					init_std
         _lowerCAmelCase	      =					decoder_layerdrop
         _lowerCAmelCase	      =					use_cache
         _lowerCAmelCase	      =					decoder_layers
         _lowerCAmelCase	      =					scale_embedding  # scale factor will be sqrt(d_model) if True
         _lowerCAmelCase	      =					max_target_positions

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











import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import CONFIG_MAPPING


A__      :     Tuple       =					logging.get_logger(__name__)
class  _UpperCAmelCase   (			A__      ):

				"""simple docstring"""




				lowercase__											=			"""upernet"""




				def __init__(	self		:       Dict,    lowerCamelCase		:       Union[str, Any]=None,    lowerCamelCase		:       str=512,    lowerCamelCase		:       Optional[Any]=0.02,    lowerCamelCase		:       Optional[Any]=[1, 2, 3, 6],    lowerCamelCase		:       Optional[int]=True,    lowerCamelCase		:       Tuple=0.4,    lowerCamelCase		:       Optional[int]=384,    lowerCamelCase		:       Optional[int]=256,    lowerCamelCase		:       Dict=1,    lowerCamelCase		:       str=False,    lowerCamelCase		:       List[str]=255,    **lowerCamelCase		:       List[Any],    ):

								'''simple docstring'''
								super().__init__(**lowerCamelCase    )

								if backbone_config is None:
												logger.info('''`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone.'''    )
												lowercase__  					=     CONFIG_MAPPING['''resnet'''](out_features=['''stage1''', '''stage2''', '''stage3''', '''stage4''']    )
								elif isinstance(lowerCamelCase,    lowerCamelCase    ):
												lowercase__  					=     backbone_config.get('''model_type'''    )
												lowercase__  					=     CONFIG_MAPPING[backbone_model_type]
												lowercase__  					=     config_class.from_dict(lowerCamelCase    )

								lowercase__  					=     backbone_config
								lowercase__  					=     hidden_size
								lowercase__  					=     initializer_range
								lowercase__  					=     pool_scales
								lowercase__  					=     use_auxiliary_head
								lowercase__  					=     auxiliary_loss_weight
								lowercase__  					=     auxiliary_in_channels
								lowercase__  					=     auxiliary_channels
								lowercase__  					=     auxiliary_num_convs
								lowercase__  					=     auxiliary_concat_input
								lowercase__  					=     loss_ignore_index




				def 							lowercase__  (	self		:       str    ):

								'''simple docstring'''
								lowercase__  					=     copy.deepcopy(self.__dict__    )
								lowercase__  					=     self.backbone_config.to_dict()
								lowercase__  					=     self.__class__.model_type
								return output




