





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


UpperCamelCase__           =			logging.get_logger(__name__)

UpperCamelCase__           =			{
    "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 							__SCREAMING_SNAKE_CASE       (  _a							):
							snake_case  :   Any      =							"""speech_to_text"""
							snake_case  :   Optional[int]      =							["""past_key_values"""]
							snake_case  :   List[str]      =							{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}






							def __init__(    self	,			__lowerCAmelCase=10000	,			__lowerCAmelCase=12	,			__lowerCAmelCase=2048	,			__lowerCAmelCase=4	,			__lowerCAmelCase=6	,			__lowerCAmelCase=2048	,			__lowerCAmelCase=4	,			__lowerCAmelCase=0.0	,			__lowerCAmelCase=0.0	,			__lowerCAmelCase=True	,			__lowerCAmelCase=True	,			__lowerCAmelCase="relu"	,			__lowerCAmelCase=256	,			__lowerCAmelCase=0.1	,			__lowerCAmelCase=0.0	,			__lowerCAmelCase=0.0	,			__lowerCAmelCase=0.02	,			__lowerCAmelCase=2	,			__lowerCAmelCase=True	,			__lowerCAmelCase=1	,			__lowerCAmelCase=0	,			__lowerCAmelCase=2	,			__lowerCAmelCase=6000	,			__lowerCAmelCase=1024	,			__lowerCAmelCase=2	,			__lowerCAmelCase=(5, 5)	,			__lowerCAmelCase=1024	,			__lowerCAmelCase=80	,			__lowerCAmelCase=1	,			**__lowerCAmelCase	,			):
														UpperCamelCase__					  =      vocab_size
														UpperCamelCase__					  =      d_model
														UpperCamelCase__					  =      encoder_ffn_dim
														UpperCamelCase__					  =      encoder_layers
														UpperCamelCase__					  =      encoder_attention_heads
														UpperCamelCase__					  =      decoder_ffn_dim
														UpperCamelCase__					  =      decoder_layers
														UpperCamelCase__					  =      decoder_attention_heads
														UpperCamelCase__					  =      dropout
														UpperCamelCase__					  =      attention_dropout
														UpperCamelCase__					  =      activation_dropout
														UpperCamelCase__					  =      activation_function
														UpperCamelCase__					  =      init_std
														UpperCamelCase__					  =      encoder_layerdrop
														UpperCamelCase__					  =      decoder_layerdrop
														UpperCamelCase__					  =      use_cache
														UpperCamelCase__					  =      encoder_layers
														UpperCamelCase__					  =      scale_embedding  # scale factor will be sqrt(d_model) if True
														UpperCamelCase__					  =      max_source_positions
														UpperCamelCase__					  =      max_target_positions
														UpperCamelCase__					  =      num_conv_layers
														UpperCamelCase__					  =      list(__lowerCAmelCase	)
														UpperCamelCase__					  =      conv_channels
														UpperCamelCase__					  =      input_feat_per_channel
														UpperCamelCase__					  =      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 __future__ import annotations

from math import pi





def      _UpperCamelCase  (a__ :float ,      a__ :float ,      a__ :float							):






							"""simple docstring"""





							if (inductance, frequency, reactance).count(0							) != 1:
														raise ValueError("""One and only one argument must be 0"""							)
							if inductance < 0:
														raise ValueError("""Inductance cannot be negative"""							)
							if frequency < 0:
														raise ValueError("""Frequency cannot be negative"""							)
							if reactance < 0:
														raise ValueError("""Inductive reactance cannot be negative"""							)
							if inductance == 0:
														return {"inductance": reactance / (2 * pi * frequency)}
							elif frequency == 0:
														return {"frequency": reactance / (2 * pi * inductance)}
							elif reactance == 0:
														return {"reactance": 2 * pi * frequency * inductance}
							else:
														raise ValueError("""Exactly one argument must be 0"""							)


if __name__ == "__main__":
					import doctest

					doctest.testmod()




