






"""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 scipy.constants import g





def      _UpperCAmelCase    (							_UpperCamelCase    :	float,   _UpperCamelCase    :	float   )	->      float:
    if mass < 0:
        # handling of negative values of mass
        raise ValueError('''The mass of a body cannot be negative'''   )
    if height < 0:
        # handling of negative values of height
        raise ValueError('''The height above the ground cannot be negative'''   )
    return mass * g * height


if __name__ == "__main__":
  from doctest import testmod

  testmod(name='potential_energy')






