






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


SCREAMING_SNAKE_CASE__				     =			logging.get_logger(__name__)

SCREAMING_SNAKE_CASE__				     =			{
    '''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(       __lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       str							=							'''speech_to_text'''
		__SCREAMING_SNAKE_CASE  :       Any							=							['''past_key_values''']
		__SCREAMING_SNAKE_CASE  :       Optional[Any]							=							{'''num_attention_heads''': '''encoder_attention_heads''', '''hidden_size''': '''d_model'''}

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



					'''simple docstring'''



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







"""simple docstring"""
from collections import OrderedDict
from typing import List, Mapping

from packaging import version

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


SCREAMING_SNAKE_CASE_					     =	logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_					     =	{
    '''google/efficientnet-b7''': '''https://huggingface.co/google/efficientnet-b7/resolve/main/config.json''',
}
class       lowerCAmelCase_		(				A__ ):



							'''simple docstring'''





							_snake_case						      =		'''efficientnet'''




							def __init__( self    ,				snake_case_ = 3    ,				snake_case_ = 600    ,				snake_case_ = 2.0    ,				snake_case_ = 3.1    ,				snake_case_ = 8    ,				snake_case_ = [3, 3, 5, 3, 5, 5, 3]    ,				snake_case_ = [32, 16, 24, 40, 80, 112, 192]    ,				snake_case_ = [16, 24, 40, 80, 112, 192, 320]    ,				snake_case_ = []    ,				snake_case_ = [1, 2, 2, 2, 1, 2, 1]    ,				snake_case_ = [1, 2, 2, 3, 3, 4, 1]    ,				snake_case_ = [1, 6, 6, 6, 6, 6, 6]    ,				snake_case_ = 0.25    ,				snake_case_ = "swish"    ,				snake_case_ = 2_560    ,				snake_case_ = "mean"    ,				snake_case_ = 0.02    ,				snake_case_ = 0.001    ,				snake_case_ = 0.99    ,				snake_case_ = 0.5    ,				snake_case_ = 0.2    ,				**snake_case_    ,				)       ->  List[str]:
													super().__init__(**snake_case_				)

													__lowerCAmelCase     =  num_channels
													__lowerCAmelCase     =  image_size
													__lowerCAmelCase     =  width_coefficient
													__lowerCAmelCase     =  depth_coefficient
													__lowerCAmelCase     =  depth_divisor
													__lowerCAmelCase     =  kernel_sizes
													__lowerCAmelCase     =  in_channels
													__lowerCAmelCase     =  out_channels
													__lowerCAmelCase     =  depthwise_padding
													__lowerCAmelCase     =  strides
													__lowerCAmelCase     =  num_block_repeats
													__lowerCAmelCase     =  expand_ratios
													__lowerCAmelCase     =  squeeze_expansion_ratio
													__lowerCAmelCase     =  hidden_act
													__lowerCAmelCase     =  hidden_dim
													__lowerCAmelCase     =  pooling_type
													__lowerCAmelCase     =  initializer_range
													__lowerCAmelCase     =  batch_norm_eps
													__lowerCAmelCase     =  batch_norm_momentum
													__lowerCAmelCase     =  dropout_rate
													__lowerCAmelCase     =  drop_connect_rate
													__lowerCAmelCase     =  sum(snake_case_				) * 4
class       lowerCAmelCase_		(				A__ ):



							'''simple docstring'''





							_snake_case						      =		version.parse('''1.11''' )




							@property
							def    A__						( self				)       ->  Mapping[str, Mapping[int, str]]:
													return OrderedDict(
													    [
													        ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
													    ]				)




							@property
							def    A__						( self				)       ->  float:
													return 1e-5
