





import warnings

from ...utils import logging
from .image_processing_mobilenet_va import MobileNetVaImageProcessor


_UpperCAmelCase										=					logging.get_logger(__name__)



class 				_UpperCamelCase       (						lowerCAmelCase_  ):

       def __init__(		self:			Union[str, Any]       , *_SCREAMING_SNAKE_CASE:			Any       , **_SCREAMING_SNAKE_CASE:			str		)							->			None:




              """simple docstring"""


              warnings.warn(
                  "The class MobileNetV1FeatureExtractor is deprecated and will be removed in version 5 of Transformers."
                  " Please use MobileNetV1ImageProcessor instead."       , _SCREAMING_SNAKE_CASE       , )
              super().__init__(*_SCREAMING_SNAKE_CASE       , **_SCREAMING_SNAKE_CASE		)








from collections import OrderedDict
from typing import Mapping

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


_UpperCAmelCase										=					logging.get_logger(__name__)

_UpperCAmelCase										=					{
    'mnaylor/mega-base-wikitext': 'https://huggingface.co/mnaylor/mega-base-wikitext/resolve/main/config.json',
}



class 				_UpperCamelCase       (						lowerCAmelCase_  ):
       _UpperCamelCase					:       Union[str, Any]       = '''mega'''

       def __init__(		self:			Optional[int]       , _SCREAMING_SNAKE_CASE:			Union[str, Any]=30522       , _SCREAMING_SNAKE_CASE:			Optional[Any]=128       , _SCREAMING_SNAKE_CASE:			Any=4       , _SCREAMING_SNAKE_CASE:			Tuple=256       , _SCREAMING_SNAKE_CASE:			List[str]=16       , _SCREAMING_SNAKE_CASE:			Dict=True       , _SCREAMING_SNAKE_CASE:			Optional[int]=64       , _SCREAMING_SNAKE_CASE:			Union[str, Any]=False       , _SCREAMING_SNAKE_CASE:			List[Any]=-1       , _SCREAMING_SNAKE_CASE:			Tuple=None       , _SCREAMING_SNAKE_CASE:			Optional[Any]=True       , _SCREAMING_SNAKE_CASE:			Optional[int]="scalenorm"       , _SCREAMING_SNAKE_CASE:			int=True       , _SCREAMING_SNAKE_CASE:			List[str]="silu"       , _SCREAMING_SNAKE_CASE:			int="softmax"       , _SCREAMING_SNAKE_CASE:			List[Any]=0.1       , _SCREAMING_SNAKE_CASE:			Optional[int]=0.1       , _SCREAMING_SNAKE_CASE:			Optional[Any]=0.1       , _SCREAMING_SNAKE_CASE:			Tuple=False       , _SCREAMING_SNAKE_CASE:			List[Any]=True       , _SCREAMING_SNAKE_CASE:			Tuple=256       , _SCREAMING_SNAKE_CASE:			Any=True       , _SCREAMING_SNAKE_CASE:			List[Any]=0.1       , _SCREAMING_SNAKE_CASE:			Optional[Any]=2048       , _SCREAMING_SNAKE_CASE:			Any=False       , _SCREAMING_SNAKE_CASE:			Optional[Any]=2       , _SCREAMING_SNAKE_CASE:			List[str]=0.02       , _SCREAMING_SNAKE_CASE:			Tuple=0.2       , _SCREAMING_SNAKE_CASE:			Optional[int]=0.02       , _SCREAMING_SNAKE_CASE:			Tuple=1.0       , _SCREAMING_SNAKE_CASE:			List[str]=1       , _SCREAMING_SNAKE_CASE:			List[Any]=0       , _SCREAMING_SNAKE_CASE:			Optional[Any]=2       , _SCREAMING_SNAKE_CASE:			Optional[int]="rotary"       , _SCREAMING_SNAKE_CASE:			Optional[Any]=None       , _SCREAMING_SNAKE_CASE:			Any=True       , _SCREAMING_SNAKE_CASE:			Optional[Any]=True       , **_SCREAMING_SNAKE_CASE:			Union[str, Any]       , )							->			Optional[Any]:




              """simple docstring"""


              super().__init__(pad_token_id=_SCREAMING_SNAKE_CASE       , bos_token_id=_SCREAMING_SNAKE_CASE       , eos_token_id=_SCREAMING_SNAKE_CASE       , **_SCREAMING_SNAKE_CASE		)

              UpperCamelCase_ 							=	vocab_size
              UpperCamelCase_ 							=	hidden_size
              UpperCamelCase_ 							=	num_hidden_layers
              UpperCamelCase_ 							=	activation
              UpperCamelCase_ 							=	attention_activation
              UpperCamelCase_ 							=	intermediate_size
              UpperCamelCase_ 							=	ema_projection_size
              UpperCamelCase_ 							=	bidirectional
              UpperCamelCase_ 							=	shared_representation_size
              UpperCamelCase_ 							=	use_chunking
              UpperCamelCase_ 							=	chunk_size
              UpperCamelCase_ 							=	truncation
              UpperCamelCase_ 							=	normalize_before_mega
              UpperCamelCase_ 							=	normalization_type
              UpperCamelCase_ 							=	norm_affine
              UpperCamelCase_ 							=	dropout_prob
              UpperCamelCase_ 							=	hidden_dropout_prob
              UpperCamelCase_ 							=	attention_probs_dropout_prob
              UpperCamelCase_ 							=	use_feature_dropout
              UpperCamelCase_ 							=	use_normalized_ffn
              UpperCamelCase_ 							=	nffn_hidden_size
              UpperCamelCase_ 							=	normalize_before_ffn
              UpperCamelCase_ 							=	nffn_activation_dropout_prob
              UpperCamelCase_ 							=	max_positions
              UpperCamelCase_ 							=	add_token_type_embeddings
              UpperCamelCase_ 							=	type_vocab_size
              UpperCamelCase_ 							=	initializer_range
              UpperCamelCase_ 							=	ema_delta_alpha_range
              UpperCamelCase_ 							=	ema_beta_range
              UpperCamelCase_ 							=	ema_gamma_omega_range
              UpperCamelCase_ 							=	relative_positional_bias
              UpperCamelCase_ 							=	use_cache
              UpperCamelCase_ 							=	classifier_dropout
              UpperCamelCase_ 							=	add_lm_hidden_dense_layer
              UpperCamelCase_ 							=	1  # not used but required by Hugging Face



class 				_UpperCamelCase       (						lowerCAmelCase_  ):

       @property
       def lowercase			(		self:			Optional[int]		)							->			Mapping[str, Mapping[int, str]]:




              """simple docstring"""


              if self.task == "multiple-choice":
                     UpperCamelCase_ 							=	{0: "batch", 1: "choice", 2: "sequence"}
              else:
                     UpperCamelCase_ 							=	{0: "batch", 1: "sequence"}
              return OrderedDict(
                  [
                      ("input_ids", dynamic_axis),
                      ("attention_mask", dynamic_axis),
                  ]		)

