



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


__lowerCamelCase     :							Tuple  							=  logging.get_logger(__name__)

__lowerCamelCase     :							Dict  							=  {
    "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  __magic_name__   (							A__						):
		lowercase      :       Tuple          ='''trocr'''
		lowercase      :       List[str]          =['''past_key_values''']
		lowercase      :       Optional[int]          ={
		    '''num_attention_heads''': '''decoder_attention_heads''',
		    '''hidden_size''': '''d_model''',
		    '''num_hidden_layers''': '''decoder_layers''',
		}






		def __init__(						self      :     List[str]				,		UpperCamelCase__      :     Dict=5_02_65				,		UpperCamelCase__      :     List[str]=10_24				,		UpperCamelCase__      :     str=12				,		UpperCamelCase__      :     Optional[Any]=16				,		UpperCamelCase__      :     Optional[Any]=40_96				,		UpperCamelCase__      :     Union[str, Any]="gelu"				,		UpperCamelCase__      :     Union[str, Any]=5_12				,		UpperCamelCase__      :     Optional[Any]=0.1				,		UpperCamelCase__      :     Tuple=0.0				,		UpperCamelCase__      :     Any=0.0				,		UpperCamelCase__      :     List[str]=2				,		UpperCamelCase__      :     Tuple=0.02				,		UpperCamelCase__      :     str=0.0				,		UpperCamelCase__      :     int=True				,		UpperCamelCase__      :     List[Any]=False				,		UpperCamelCase__      :     str=True				,		UpperCamelCase__      :     int=True				,		UpperCamelCase__      :     Union[str, Any]=1				,		UpperCamelCase__      :     List[Any]=0				,		UpperCamelCase__      :     Optional[int]=2				,		**UpperCamelCase__      :     List[str]				,		)				->					str:
								'''simple docstring'''







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

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








from ..utils import DummyObject, requires_backends





class  __magic_name__   (							metaclass=A__						):
		lowercase      :       int          =['''note_seq''']






		def __init__(						self      :     List[Any]				,		*UpperCamelCase__      :     Tuple				,		**UpperCamelCase__      :     Dict      )				->					int:
								'''simple docstring'''







								requires_backends(self				,		["note_seq"]      )






		@classmethod
		def SCREAMING_SNAKE_CASE_			(						cls      :     List[str]				,		*UpperCamelCase__      :     Dict				,		**UpperCamelCase__      :     str      )				->					Optional[int]:
								'''simple docstring'''







								requires_backends(cls				,		["note_seq"]      )







		@classmethod
		def SCREAMING_SNAKE_CASE_			(						cls      :     List[Any]				,		*UpperCamelCase__      :     Optional[int]				,		**UpperCamelCase__      :     Optional[Any]      )				->					Optional[int]:
								'''simple docstring'''







								requires_backends(cls				,		["note_seq"]      )



