






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


_UpperCAmelCase			:		Tuple   				=    logging.get_logger(__name__)

_UpperCAmelCase			:		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  lowerCAmelCase_       (				snake_case__					):
							UpperCamelCase_		:List[Any]		      =    'speech_to_text_2'
							UpperCamelCase_		:Optional[Any]		      =    ['past_key_values']
							UpperCamelCase_		:Any		      =    {'num_attention_heads': 'decoder_attention_heads', 'hidden_size': 'd_model'}




							def __init__(   self     :   int ,							SCREAMING_SNAKE_CASE_     :   Any=10_000 ,							SCREAMING_SNAKE_CASE_     :   List[str]=6 ,							SCREAMING_SNAKE_CASE_     :   Tuple=2_048 ,							SCREAMING_SNAKE_CASE_     :   List[str]=4 ,							SCREAMING_SNAKE_CASE_     :   Optional[int]=0.0 ,							SCREAMING_SNAKE_CASE_     :   Any=True ,							SCREAMING_SNAKE_CASE_     :   Union[str, Any]="relu" ,							SCREAMING_SNAKE_CASE_     :   Optional[int]=256 ,							SCREAMING_SNAKE_CASE_     :   Optional[int]=0.1 ,							SCREAMING_SNAKE_CASE_     :   Tuple=0.0 ,							SCREAMING_SNAKE_CASE_     :   Optional[Any]=0.0 ,							SCREAMING_SNAKE_CASE_     :   Any=0.02 ,							SCREAMING_SNAKE_CASE_     :   Tuple=2 ,							SCREAMING_SNAKE_CASE_     :   Optional[Any]=True ,							SCREAMING_SNAKE_CASE_     :   Union[str, Any]=1 ,							SCREAMING_SNAKE_CASE_     :   Tuple=0 ,							SCREAMING_SNAKE_CASE_     :   Tuple=2 ,							SCREAMING_SNAKE_CASE_     :   Tuple=1_024 ,							**SCREAMING_SNAKE_CASE_     :   Tuple ,							):
											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=SCREAMING_SNAKE_CASE_ ,							bos_token_id=SCREAMING_SNAKE_CASE_ ,							eos_token_id=SCREAMING_SNAKE_CASE_ ,							decoder_start_token_id=SCREAMING_SNAKE_CASE_ ,							**SCREAMING_SNAKE_CASE_ ,							)













from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_UpperCAmelCase			:		List[Any]   				=    {
    "configuration_mobilenet_v2": [
        "MOBILENET_V2_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "MobileNetV2Config",
        "MobileNetV2OnnxConfig",
    ],
}

try:
			if not is_vision_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_UpperCAmelCase			:		str   				=    ["MobileNetV2FeatureExtractor"]
			_UpperCAmelCase			:		Union[str, Any]   				=    ["MobileNetV2ImageProcessor"]


try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_UpperCAmelCase			:		Any   				=    [
			    "MOBILENET_V2_PRETRAINED_MODEL_ARCHIVE_LIST",
			    "MobileNetV2ForImageClassification",
			    "MobileNetV2ForSemanticSegmentation",
			    "MobileNetV2Model",
			    "MobileNetV2PreTrainedModel",
			    "load_tf_weights_in_mobilenet_v2",
			]


if TYPE_CHECKING:
			from .configuration_mobilenet_va import (
			    MOBILENET_V2_PRETRAINED_CONFIG_ARCHIVE_MAP,
			    MobileNetVaConfig,
			    MobileNetVaOnnxConfig,
			)

			try:
						if not is_vision_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .feature_extraction_mobilenet_va import MobileNetVaFeatureExtractor
						from .image_processing_mobilenet_va import MobileNetVaImageProcessor

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_mobilenet_va import (
						    MOBILENET_V2_PRETRAINED_MODEL_ARCHIVE_LIST,
						    MobileNetVaForImageClassification,
						    MobileNetVaForSemanticSegmentation,
						    MobileNetVaModel,
						    MobileNetVaPreTrainedModel,
						    load_tf_weights_in_mobilenet_va,
						)


else:
			import sys

			_UpperCAmelCase			:		Dict   				=    _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





