
"""simple docstring"""






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


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

lowerCamelCase__ :       List[str]						     =			{
    "naver-clova-ix/donut-base": "https://huggingface.co/naver-clova-ix/donut-base/resolve/main/config.json",
    # See all Donut models at https://huggingface.co/models?filter=donut-swin
}
class 				lowercase__(				_UpperCAmelCase   ):
	'''simple docstring'''

	UpperCamelCase				=  """donut-swin"""

	UpperCamelCase				=  {
	    """num_attention_heads""": """num_heads""",
	    """num_hidden_layers""": """num_layers""",
	}





	def __init__(						self    :Union[str, Any]		, lowerCamelCase_    :int=2_24		, lowerCamelCase_    :Dict=4		, lowerCamelCase_    :Any=3		, lowerCamelCase_    :Any=96		, lowerCamelCase_    :Any=[2, 2, 6, 2]		, lowerCamelCase_    :str=[3, 6, 12, 24]		, lowerCamelCase_    :Optional[int]=7		, lowerCamelCase_    :str=4.0		, lowerCamelCase_    :Dict=True		, lowerCamelCase_    :int=0.0		, lowerCamelCase_    :Any=0.0		, lowerCamelCase_    :int=0.1		, lowerCamelCase_    :Tuple="gelu"		, lowerCamelCase_    :Optional[Any]=False		, lowerCamelCase_    :Union[str, Any]=0.0_2		, lowerCamelCase_    :int=1E-5		, **lowerCamelCase_    :Any		, )							->			Tuple:







			'''simple docstring'''




			super().__init__(**lowerCamelCase_					)

			SCREAMING_SNAKE_CASE       :     Optional[Any]				= image_size
			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= patch_size
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= num_channels
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= embed_dim
			SCREAMING_SNAKE_CASE       :     List[str]				= depths
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= len(lowerCamelCase_					)
			SCREAMING_SNAKE_CASE       :     Optional[int]				= num_heads
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= window_size
			SCREAMING_SNAKE_CASE       :     str				= mlp_ratio
			SCREAMING_SNAKE_CASE       :     Optional[int]				= qkv_bias
			SCREAMING_SNAKE_CASE       :     Optional[int]				= hidden_dropout_prob
			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= attention_probs_dropout_prob
			SCREAMING_SNAKE_CASE       :     Tuple				= drop_path_rate
			SCREAMING_SNAKE_CASE       :     str				= hidden_act
			SCREAMING_SNAKE_CASE       :     Tuple				= use_absolute_embeddings
			SCREAMING_SNAKE_CASE       :     Tuple				= layer_norm_eps
			SCREAMING_SNAKE_CASE       :     Optional[int]				= initializer_range
			# we set the hidden_size attribute in order to make Swin work with VisionEncoderDecoderModel
			# this indicates the channel dimension after the last stage of the model
			SCREAMING_SNAKE_CASE       :     List[Any]				= int(embed_dim * 2 ** (len(lowerCamelCase_					) - 1)					)







"""simple docstring"""






def __A						(   a_ :							list		,		a_ :							int		,		a_ :							int = 0		,		a_ :							int = 0     )->							int:




		'''simple docstring'''






		SCREAMING_SNAKE_CASE       :     str				= right or len(a_     ) - 1
		if left > right:
				return -1
		elif list_data[left] == key:
				return left
		elif list_data[right] == key:
				return right
		else:
				return search(a_		,		a_		,		left + 1		,		right - 1     )


if __name__ == "__main__":
					import doctest

					doctest.testmod()





