






"""simple docstring"""


from typing import Callable, Optional, Union

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


_UpperCamelCase				:    int     =						logging.get_logger(__name__)

_UpperCamelCase				:    Optional[int]     =						{
    'microsoft/prophetnet-large-uncased': (
        'https://huggingface.co/microsoft/prophetnet-large-uncased/resolve/main/config.json'
    ),
}






class 						snake_case  (  UpperCAmelCase       ):
    __magic_name__         =     '''prophetnet'''
    __magic_name__         =     ['''past_key_values''']
    __magic_name__         =     {
        '''num_attention_heads''': '''num_encoder_attention_heads''',
    }





    def __init__(							self	:					Optional[Any]				,		A	:					Optional[float] = 0.1				,		A	:					Optional[Union[str, Callable]] = "gelu"				,		A	:					Optional[int] = 3_0_5_2_2				,		A	:					Optional[int] = 1_0_2_4				,		A	:					Optional[int] = 4_0_9_6				,		A	:					Optional[int] = 1_2				,		A	:					Optional[int] = 1_6				,		A	:					Optional[int] = 4_0_9_6				,		A	:					Optional[int] = 1_2				,		A	:					Optional[int] = 1_6				,		A	:					Optional[float] = 0.1				,		A	:					Optional[float] = 0.1				,		A	:					Optional[int] = 5_1_2				,		A	:					Optional[float] = 0.02				,		A	:					Optional[bool] = True				,		A	:					Optional[bool] = True				,		A	:					Optional[int] = 0				,		A	:					Optional[int] = 2				,		A	:					Optional[int] = 3_2				,		A	:					Optional[int] = 1_2_8				,		A	:					Optional[bool] = False				,		A	:					Optional[float] = 0.0				,		A	:					Optional[bool] = True				,		A	:					Optional[int] = 0				,		A	:					Optional[int] = 1				,		A	:					Optional[int] = 2				,		**A	:					List[str]				,		):


      '''simple docstring'''




      a     :			Optional[Any]				=   vocab_size
      a     :			Union[str, Any]				=   hidden_size
      a     :			Optional[Any]				=   encoder_ffn_dim
      a     :			Dict				=   num_encoder_layers
      a     :			Tuple				=   num_encoder_attention_heads
      a     :			Tuple				=   decoder_ffn_dim
      a     :			Dict				=   num_decoder_layers
      a     :			Optional[Any]				=   num_decoder_attention_heads
      a     :			Tuple				=   max_position_embeddings
      a     :			int				=   init_std  # Normal(0, this parameter)
      a     :			Optional[Any]				=   activation_function

      # parameters for prophetnet
      a     :			List[Any]				=   ngram
      a     :			List[str]				=   num_buckets
      a     :			Optional[Any]				=   relative_max_distance
      a     :			Optional[int]				=   disable_ngram_loss
      a     :			Optional[Any]				=   eps

      # 3 Types of Dropout
      a     :			Dict				=   attention_dropout
      a     :			Tuple				=   activation_dropout
      a     :			Dict				=   dropout

      a     :			Tuple				=   use_cache

      super().__init__(
          pad_token_id=A				,		bos_token_id=A				,		eos_token_id=A				,		is_encoder_decoder=A				,		add_cross_attention=A				,		decoder_start_token_id=A				,		**A				,		)





    @property
    def 				lowerCamelCase__      (							self	:					Tuple			):


      '''simple docstring'''




      return self.num_encoder_layers + self.num_decoder_layers





    @num_hidden_layers.setter
    def 				lowerCamelCase__      (							self	:					Union[str, Any]				,		A	:					List[Any]			):


      '''simple docstring'''




      raise NotImplementedError(
          'This model does not support the setting of `num_hidden_layers`. Please set `num_encoder_layers` and'
          ' `num_decoder_layers`.'			)











"""simple docstring"""





from typing import TYPE_CHECKING

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


_lowerCamelCase       =	{
    '''configuration_mobilenet_v1''': [
        '''MOBILENET_V1_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''MobileNetV1Config''',
        '''MobileNetV1OnnxConfig''',
    ],
}

try:
    if not is_vision_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    _lowerCamelCase       =	['''MobileNetV1FeatureExtractor''']
    _lowerCamelCase       =	['''MobileNetV1ImageProcessor''']

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    _lowerCamelCase       =	[
        '''MOBILENET_V1_PRETRAINED_MODEL_ARCHIVE_LIST''',
        '''MobileNetV1ForImageClassification''',
        '''MobileNetV1Model''',
        '''MobileNetV1PreTrainedModel''',
        '''load_tf_weights_in_mobilenet_v1''',
    ]


if TYPE_CHECKING:
    from .configuration_mobilenet_va import (
        MOBILENET_V1_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_V1_PRETRAINED_MODEL_ARCHIVE_LIST,
            MobileNetVaForImageClassification,
            MobileNetVaModel,
            MobileNetVaPreTrainedModel,
            load_tf_weights_in_mobilenet_va,
        )


else:
    import sys

    _lowerCamelCase       =	_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)

