






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


UpperCamelCase 				=	logging.get_logger(__name__)

UpperCamelCase 				=	{
    "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		(__lowerCamelCase    ):
			__snake_case				:      Tuple 						=							"trocr"
			__snake_case				:      List[Any] 						=							["past_key_values"]
			__snake_case				:      List[str] 						=							{
			    "num_attention_heads": "decoder_attention_heads",
			    "hidden_size": "d_model",
			    "num_hidden_layers": "decoder_layers",
			}







			def __init__(	self:  Dict      ,	UpperCAmelCase_:  List[str]=50_265      ,	UpperCAmelCase_:  str=1_024      ,	UpperCAmelCase_:  int=12      ,	UpperCAmelCase_:  str=16      ,	UpperCAmelCase_:  Optional[Any]=4_096      ,	UpperCAmelCase_:  Union[str, Any]="gelu"      ,	UpperCAmelCase_:  List[Any]=512      ,	UpperCAmelCase_:  int=0.1      ,	UpperCAmelCase_:  List[str]=0.0      ,	UpperCAmelCase_:  Union[str, Any]=0.0      ,	UpperCAmelCase_:  Union[str, Any]=2      ,	UpperCAmelCase_:  Any=0.02      ,	UpperCAmelCase_:  List[Any]=0.0      ,	UpperCAmelCase_:  List[Any]=True      ,	UpperCAmelCase_:  Optional[int]=False      ,	UpperCAmelCase_:  Union[str, Any]=True      ,	UpperCAmelCase_:  List[str]=True      ,	UpperCAmelCase_:  List[Any]=1      ,	UpperCAmelCase_:  List[Any]=0      ,	UpperCAmelCase_:  Any=2      ,	**UpperCAmelCase_:  Optional[int]      ,	):







									'''simple docstring'''




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

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








__UpperCAmelCase       :   int				       =							[
    "Audio",
    "Array2D",
    "Array3D",
    "Array4D",
    "Array5D",
    "ClassLabel",
    "Features",
    "Sequence",
    "Value",
    "Image",
    "Translation",
    "TranslationVariableLanguages",
]
from .audio import Audio
from .features import ArrayaD, ArrayaD, ArrayaD, ArrayaD, ClassLabel, Features, Sequence, Value
from .image import Image
from .translation import Translation, TranslationVariableLanguages






