





'''simple docstring'''


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


lowercase							       =			logging.get_logger(__name__)

lowercase							       =			{
    '''microsoft/trocr-base-handwritten''': (
        '''https://huggingface.co/microsoft/trocr-base-handwritten/resolve/main/config.json'''
    ),
    # See all TrOCR models at https://huggingface.co/models?filter=trocr
}







class 	UpperCAmelCase	(		__a):


 '''simple docstring'''




 __magic_name__					: int  =      "trocr"
 __magic_name__					: Optional[int]  =      ["past_key_values"]
 __magic_name__					: List[Any]  =      {
     "num_attention_heads": "decoder_attention_heads",
     "hidden_size": "d_model",
     "num_hidden_layers": "decoder_layers",
 }




 def __init__(   self							,  lowerCAmelCase_=5_0_2_6_5							,  lowerCAmelCase_=1_0_2_4							,  lowerCAmelCase_=1_2							,  lowerCAmelCase_=1_6							,  lowerCAmelCase_=4_0_9_6							,  lowerCAmelCase_="gelu"							,  lowerCAmelCase_=5_1_2							,  lowerCAmelCase_=0.1							,  lowerCAmelCase_=0.0							,  lowerCAmelCase_=0.0							,  lowerCAmelCase_=2							,  lowerCAmelCase_=0.0_2							,  lowerCAmelCase_=0.0							,  lowerCAmelCase_=True							,  lowerCAmelCase_=False							,  lowerCAmelCase_=True							,  lowerCAmelCase_=True							,  lowerCAmelCase_=1							,  lowerCAmelCase_=0							,  lowerCAmelCase_=2							,  **lowerCAmelCase_							,  ) ->      Union[str, Any]:



      """simple docstring"""







      a_       		=vocab_size
      a_       		=d_model
      a_       		=decoder_layers
      a_       		=decoder_attention_heads
      a_       		=decoder_ffn_dim
      a_       		=activation_function
      a_       		=max_position_embeddings
      a_       		=dropout
      a_       		=attention_dropout
      a_       		=activation_dropout
      a_       		=init_std
      a_       		=decoder_layerdrop
      a_       		=use_cache
      a_       		=scale_embedding
      a_       		=use_learned_position_embeddings
      a_       		=layernorm_embedding

      super().__init__(
          pad_token_id=lowerCAmelCase_							,  bos_token_id=lowerCAmelCase_							,  eos_token_id=lowerCAmelCase_							,  decoder_start_token_id=lowerCAmelCase_							,  **lowerCAmelCase_							,  )







'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowercase							       =			{
    '''configuration_timesformer''': ['''TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''TimesformerConfig'''],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			[
      '''TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''TimesformerModel''',
      '''TimesformerForVideoClassification''',
      '''TimesformerPreTrainedModel''',
  ]

if TYPE_CHECKING:
  from .configuration_timesformer import TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, TimesformerConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_timesformer import (
        TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
        TimesformerForVideoClassification,
        TimesformerModel,
        TimesformerPreTrainedModel,
    )

else:
  import sys

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


