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


lowercase  : str						   =							logging.get_logger(__name__)

lowercase  : Tuple						   =							{
    "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 __snake_case		(				UpperCAmelCase__					):
				_a		:						Optional[Any]=    'speech_to_text'
				_a		:						Any=    ['past_key_values']
				_a		:						Optional[int]=    {'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}
				def __init__(  self		,snake_case=10000		,snake_case=12		,snake_case=2048		,snake_case=4		,snake_case=6		,snake_case=2048		,snake_case=4		,snake_case=0.0		,snake_case=0.0		,snake_case=True		,snake_case=True		,snake_case="relu"		,snake_case=256		,snake_case=0.1		,snake_case=0.0		,snake_case=0.0		,snake_case=0.02		,snake_case=2		,snake_case=True		,snake_case=1		,snake_case=0		,snake_case=2		,snake_case=6000		,snake_case=1024		,snake_case=2		,snake_case=(5, 5)		,snake_case=1024		,snake_case=80		,snake_case=1		,**snake_case		,):



											'''simple docstring'''







											lowercase							:					Tuple	     =				vocab_size
											lowercase							:					Union[str, Any]	     =				d_model
											lowercase							:					Optional[Any]	     =				encoder_ffn_dim
											lowercase							:					Dict	     =				encoder_layers
											lowercase							:					int	     =				encoder_attention_heads
											lowercase							:					List[Any]	     =				decoder_ffn_dim
											lowercase							:					List[str]	     =				decoder_layers
											lowercase							:					str	     =				decoder_attention_heads
											lowercase							:					Union[str, Any]	     =				dropout
											lowercase							:					Union[str, Any]	     =				attention_dropout
											lowercase							:					Optional[int]	     =				activation_dropout
											lowercase							:					Dict	     =				activation_function
											lowercase							:					Union[str, Any]	     =				init_std
											lowercase							:					Union[str, Any]	     =				encoder_layerdrop
											lowercase							:					List[Any]	     =				decoder_layerdrop
											lowercase							:					List[str]	     =				use_cache
											lowercase							:					List[str]	     =				encoder_layers
											lowercase							:					Any	     =				scale_embedding  # scale factor will be sqrt(d_model) if True
											lowercase							:					Tuple	     =				max_source_positions
											lowercase							:					Dict	     =				max_target_positions
											lowercase							:					Tuple	     =				num_conv_layers
											lowercase							:					Tuple	     =				list(_SCREAMING_SNAKE_CASE				)
											lowercase							:					str	     =				conv_channels
											lowercase							:					Optional[Any]	     =				input_feat_per_channel
											lowercase							:					Optional[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=_SCREAMING_SNAKE_CASE		,bos_token_id=_SCREAMING_SNAKE_CASE		,eos_token_id=_SCREAMING_SNAKE_CASE		,is_encoder_decoder=_SCREAMING_SNAKE_CASE		,decoder_start_token_id=_SCREAMING_SNAKE_CASE		,**_SCREAMING_SNAKE_CASE		,)


from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


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

lowercase  : List[Any]						   =							{
    """google/mobilenet_v1_1.0_224""": """https://huggingface.co/google/mobilenet_v1_1.0_224/resolve/main/config.json""",
    """google/mobilenet_v1_0.75_192""": """https://huggingface.co/google/mobilenet_v1_0.75_192/resolve/main/config.json""",
    # See all MobileNetV1 models at https://huggingface.co/models?filter=mobilenet_v1
}

class __snake_case		(				lowerCAmelCase					):
    _a		:						Dict=    "mobilenet_v1"
    def __init__(  self		,snake_case=3		,snake_case=224		,snake_case=1.0		,snake_case=8		,snake_case="relu6"		,snake_case=True		,snake_case=0.999		,snake_case=0.02		,snake_case=0.001		,**snake_case		,):



           '''simple docstring'''







           super().__init__(**snake_case				)

           if depth_multiplier <= 0:
                  raise ValueError("""depth_multiplier must be greater than zero."""				)

           lowercase							:					int	     =				num_channels
           lowercase							:					Union[str, Any]	     =				image_size
           lowercase							:					int	     =				depth_multiplier
           lowercase							:					Tuple	     =				min_depth
           lowercase							:					Dict	     =				hidden_act
           lowercase							:					Dict	     =				tf_padding
           lowercase							:					Dict	     =				classifier_dropout_prob
           lowercase							:					int	     =				initializer_range
           lowercase							:					List[str]	     =				layer_norm_eps






class __snake_case		(				lowerCAmelCase					):
    _a		:						int=    version.parse("1.11"					)
    @property
    def 				_SCREAMING_SNAKE_CASE	(  self				):



           '''simple docstring'''







           return OrderedDict([("""pixel_values""", {0: """batch"""})]				)
    @property
    def 				_SCREAMING_SNAKE_CASE	(  self				):



           '''simple docstring'''







           if self.task == "image-classification":
                  return OrderedDict([("""logits""", {0: """batch"""})]				)
           else:
                  return OrderedDict([("""last_hidden_state""", {0: """batch"""}), ("""pooler_output""", {0: """batch"""})]				)
    @property
    def 				_SCREAMING_SNAKE_CASE	(  self				):



           '''simple docstring'''







           return 1e-4
