


'''simple docstring'''




from typing import Callable, Optional, Union

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


UpperCAmelCase_      :		Optional[Any]          =		logging.get_logger(__name__)

UpperCAmelCase_      :		Tuple          =		{
    "microsoft/xprophetnet-large-wiki100-cased": (
        "https://huggingface.co/microsoft/xprophetnet-large-wiki100-cased/resolve/main/config.json"
    ),
}







class 					a			(				snake_case__  ):
 '''simple docstring'''




 __lowerCAmelCase						: List[Any]							  =		"""xlm-prophetnet"""
 __lowerCAmelCase						: Dict							  =		["""past_key_values"""]
 __lowerCAmelCase						: Tuple							  =		{
     """num_attention_heads""": """num_encoder_attention_heads""",
 }




 def __init__(    self		,      lowerCamelCase_ = 0.1		,      lowerCamelCase_ = "gelu"		,      lowerCamelCase_ = 3_0_5_2_2		,      lowerCamelCase_ = 1_0_2_4		,      lowerCamelCase_ = 4_0_9_6		,      lowerCamelCase_ = 1_2		,      lowerCamelCase_ = 1_6		,      lowerCamelCase_ = 4_0_9_6		,      lowerCamelCase_ = 1_2		,      lowerCamelCase_ = 1_6		,      lowerCamelCase_ = 0.1		,      lowerCamelCase_ = 0.1		,      lowerCamelCase_ = 5_1_2		,      lowerCamelCase_ = 0.02		,      lowerCamelCase_ = True		,      lowerCamelCase_ = True		,      lowerCamelCase_ = 0		,      lowerCamelCase_ = 2		,      lowerCamelCase_ = 3_2		,      lowerCamelCase_ = 1_2_8		,      lowerCamelCase_ = False		,      lowerCamelCase_ = 0.0		,      lowerCamelCase_ = True		,      lowerCamelCase_ = 0		,      lowerCamelCase_ = 1		,      lowerCamelCase_ = 2		,      **lowerCamelCase_		,      )      ->    Optional[Any]:
    _a					:  str						=  vocab_size
    _a					:  Any						=  hidden_size
    _a					:  Dict						=  encoder_ffn_dim
    _a					:  Dict						=  num_encoder_layers
    _a					:  str						=  num_encoder_attention_heads
    _a					:  Optional[int]						=  decoder_ffn_dim
    _a					:  Optional[Any]						=  num_decoder_layers
    _a					:  Dict						=  num_decoder_attention_heads
    _a					:  Dict						=  max_position_embeddings
    _a					:  str						=  init_std  # Normal(0, this parameter)
    _a					:  Union[str, Any]						=  activation_function

    # parameters for xlmprophetnet
    _a					:  Tuple						=  ngram
    _a					:  Any						=  num_buckets
    _a					:  Dict						=  relative_max_distance
    _a					:  Any						=  disable_ngram_loss
    _a					:  Tuple						=  eps

    # 3 Types of Dropout
    _a					:  int						=  attention_dropout
    _a					:  Dict						=  activation_dropout
    _a					:  List[str]						=  dropout

    _a					:  Any						=  use_cache

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




 @property
 def   __UpperCamelCase   (    self      )      ->    int:
    return self.num_encoder_layers + self.num_decoder_layers




 @num_hidden_layers.setter
 def   __UpperCamelCase   (    self		,      lowerCamelCase_      )      ->    Tuple:
    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 ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase_      :		Optional[int]          =		logging.get_logger(__name__)

UpperCAmelCase_      :		List[str]          =		{
    "google/vivit-b-16x2-kinetics400": (
        "https://huggingface.co/google/vivit-b-16x2-kinetics400/resolve/main/config.json"
    ),
    # See all Vivit models at https://huggingface.co/models?filter=vivit
}







class 					a			(				snake_case__  ):
 '''simple docstring'''




 __lowerCAmelCase						: str							  =		"""vivit"""




 def __init__(    self		,      lowerCamelCase_=2_2_4		,      lowerCamelCase_=3_2		,      lowerCamelCase_=[2, 1_6, 1_6]		,      lowerCamelCase_=3		,      lowerCamelCase_=7_6_8		,      lowerCamelCase_=1_2		,      lowerCamelCase_=1_2		,      lowerCamelCase_=3_0_7_2		,      lowerCamelCase_="gelu_fast"		,      lowerCamelCase_=0.0		,      lowerCamelCase_=0.0		,      lowerCamelCase_=0.02		,      lowerCamelCase_=1e-06		,      lowerCamelCase_=True		,      **lowerCamelCase_		,      )      ->    int:
    _a					:  Tuple						=  hidden_size
    _a					:  Dict						=  num_hidden_layers
    _a					:  List[str]						=  num_attention_heads
    _a					:  int						=  intermediate_size
    _a					:  Optional[int]						=  hidden_act
    _a					:  Dict						=  hidden_dropout_prob
    _a					:  List[str]						=  attention_probs_dropout_prob
    _a					:  List[str]						=  initializer_range
    _a					:  List[str]						=  layer_norm_eps

    _a					:  Any						=  image_size
    _a					:  Optional[Any]						=  num_frames
    _a					:  Dict						=  tubelet_size
    _a					:  Union[str, Any]						=  num_channels
    _a					:  Optional[int]						=  qkv_bias

    super().__init__(**lowerCamelCase_      )


