





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


__UpperCamelCase:	Tuple = logging.get_logger(__name__)

__UpperCamelCase:	List[Any] = {
    """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       __lowerCAmelCase					(       _UpperCamelCase      ):


	'''simple docstring'''





	_A													=				"trocr"
	_A													=				["past_key_values"]
	_A													=				{
	    "num_attention_heads": "decoder_attention_heads",
	    "hidden_size": "d_model",
	    "num_hidden_layers": "decoder_layers",
	}

	def __init__(						self:						List[str],					lowerCamelCase_:						Dict=50265,					lowerCamelCase_:						List[str]=1024,					lowerCamelCase_:						Optional[Any]=12,					lowerCamelCase_:						int=16,					lowerCamelCase_:						int=4096,					lowerCamelCase_:						Any="gelu",					lowerCamelCase_:						int=512,					lowerCamelCase_:						Optional[Any]=0.1,					lowerCamelCase_:						Dict=0.0,					lowerCamelCase_:						Union[str, Any]=0.0,					lowerCamelCase_:						Optional[Any]=2,					lowerCamelCase_:						Dict=0.0_2,					lowerCamelCase_:						Optional[int]=0.0,					lowerCamelCase_:						Union[str, Any]=True,					lowerCamelCase_:						List[str]=False,					lowerCamelCase_:						Optional[Any]=True,					lowerCamelCase_:						List[Any]=True,					lowerCamelCase_:						List[Any]=1,					lowerCamelCase_:						Any=0,					lowerCamelCase_:						int=2,					**lowerCamelCase_:						Optional[Any],					):
			lowercase__					:      str      =		vocab_size
			lowercase__					:      Optional[Any]      =		d_model
			lowercase__					:      Optional[Any]      =		decoder_layers
			lowercase__					:      List[str]      =		decoder_attention_heads
			lowercase__					:      Tuple      =		decoder_ffn_dim
			lowercase__					:      Union[str, Any]      =		activation_function
			lowercase__					:      str      =		max_position_embeddings
			lowercase__					:      Optional[int]      =		dropout
			lowercase__					:      Union[str, Any]      =		attention_dropout
			lowercase__					:      Dict      =		activation_dropout
			lowercase__					:      Union[str, Any]      =		init_std
			lowercase__					:      Any      =		decoder_layerdrop
			lowercase__					:      Optional[Any]      =		use_cache
			lowercase__					:      Dict      =		scale_embedding
			lowercase__					:      Union[str, Any]      =		use_learned_position_embeddings
			lowercase__					:      Union[str, Any]      =		layernorm_embedding

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









def       SCREAMING_SNAKE_CASE__  (       _lowercase     : int   ,    _lowercase     : int			)   ->							Optional[int]:




		'''simple docstring'''
		if b == 0:
				return 1
		if (b % 2) == 0:
				return actual_power(_lowercase   ,    int(b / 2			)			) * actual_power(_lowercase   ,    int(b / 2			)			)
		else:
				return a * actual_power(_lowercase   ,    int(b / 2			)			) * actual_power(_lowercase   ,    int(b / 2			)			)


def       SCREAMING_SNAKE_CASE__  (       _lowercase     : int   ,    _lowercase     : int			)   ->							float:




		'''simple docstring'''
		if b < 0:
				return 1 / actual_power(_lowercase   ,    _lowercase			)
		return actual_power(_lowercase   ,    _lowercase			)


if __name__ == "__main__":
			print(power(-2, -3))


