


"""simple docstring"""







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


__lowercase    =				logging.get_logger(__name__)

__lowercase    =				{
    """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 						_A  (  _a  ):







    """simple docstring"""




    UpperCAmelCase	:							List[Any]     =	"""speech_to_text"""
    UpperCAmelCase	:							Optional[Any]     =	["""past_key_values"""]
    UpperCAmelCase	:							Dict     =	{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}






    def __init__( self    :   Any    ,			__UpperCAmelCase    :   Optional[int]=10000    ,			__UpperCAmelCase    :   str=12    ,			__UpperCAmelCase    :   Optional[int]=2048    ,			__UpperCAmelCase    :   List[Any]=4    ,			__UpperCAmelCase    :   int=6    ,			__UpperCAmelCase    :   int=2048    ,			__UpperCAmelCase    :   int=4    ,			__UpperCAmelCase    :   Tuple=0.0    ,			__UpperCAmelCase    :   Union[str, Any]=0.0    ,			__UpperCAmelCase    :   str=True    ,			__UpperCAmelCase    :   str=True    ,			__UpperCAmelCase    :   str="relu"    ,			__UpperCAmelCase    :   Union[str, Any]=256    ,			__UpperCAmelCase    :   List[str]=0.1    ,			__UpperCAmelCase    :   List[Any]=0.0    ,			__UpperCAmelCase    :   Optional[Any]=0.0    ,			__UpperCAmelCase    :   Union[str, Any]=0.02    ,			__UpperCAmelCase    :   Tuple=2    ,			__UpperCAmelCase    :   str=True    ,			__UpperCAmelCase    :   Optional[Any]=1    ,			__UpperCAmelCase    :   Dict=0    ,			__UpperCAmelCase    :   str=2    ,			__UpperCAmelCase    :   List[str]=6000    ,			__UpperCAmelCase    :   Union[str, Any]=1024    ,			__UpperCAmelCase    :   List[str]=2    ,			__UpperCAmelCase    :   List[str]=(5, 5)    ,			__UpperCAmelCase    :   Any=1024    ,			__UpperCAmelCase    :   List[Any]=80    ,			__UpperCAmelCase    :   List[Any]=1    ,			**__UpperCAmelCase    :   List[str]    ,			):
      a						:		Dict											=      vocab_size
      a						:		Optional[int]											=      d_model
      a						:		Any											=      encoder_ffn_dim
      a						:		Any											=      encoder_layers
      a						:		List[str]											=      encoder_attention_heads
      a						:		str											=      decoder_ffn_dim
      a						:		Any											=      decoder_layers
      a						:		Union[str, Any]											=      decoder_attention_heads
      a						:		Optional[Any]											=      dropout
      a						:		Optional[int]											=      attention_dropout
      a						:		Any											=      activation_dropout
      a						:		Optional[Any]											=      activation_function
      a						:		List[str]											=      init_std
      a						:		Union[str, Any]											=      encoder_layerdrop
      a						:		Any											=      decoder_layerdrop
      a						:		List[Any]											=      use_cache
      a						:		List[Any]											=      encoder_layers
      a						:		int											=      scale_embedding  # scale factor will be sqrt(d_model) if True
      a						:		str											=      max_source_positions
      a						:		str											=      max_target_positions
      a						:		Optional[Any]											=      num_conv_layers
      a						:		List[str]											=      list(__UpperCAmelCase)
      a						:		Any											=      conv_channels
      a						:		Union[str, Any]											=      input_feat_per_channel
      a						:		Union[str, 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=__UpperCAmelCase    ,			bos_token_id=__UpperCAmelCase    ,			eos_token_id=__UpperCAmelCase    ,			is_encoder_decoder=__UpperCAmelCase    ,			decoder_start_token_id=__UpperCAmelCase    ,			**__UpperCAmelCase    ,			)










"""simple docstring"""







import warnings

from ...utils import logging
from .image_processing_dpt import DPTImageProcessor


__lowercase    =				logging.get_logger(__name__)






class 						_A  (  _a  ):







    """simple docstring"""




    def __init__( self    :   List[Any]    ,			*__UpperCAmelCase    :   int    ,			**__UpperCAmelCase    :   List[Any]):
      warnings.warn(
          "The class DPTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"
          " use DPTImageProcessor instead."    ,			__UpperCAmelCase    ,			)
      super().__init__(*__UpperCAmelCase    ,			**__UpperCAmelCase)






