



'''simple docstring'''

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


a							   =				logging.get_logger(__name__)

a							   =				{
    '''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 						a_		(     SCREAMING_SNAKE_CASE_    ):
							UpperCAmelCase			:		Optional[int]        =				"""donut-swin"""

							UpperCAmelCase			:		Optional[Any]        =				{
							    """num_attention_heads""": """num_heads""",
							    """num_hidden_layers""": """num_layers""",
							}


							def __init__(				self   :						int      ,						a_   :						Any=2_2_4      ,						a_   :						Tuple=4      ,						a_   :						Union[str, Any]=3      ,						a_   :						Tuple=9_6      ,						a_   :						int=[2, 2, 6, 2]      ,						a_   :						List[str]=[3, 6, 1_2, 2_4]      ,						a_   :						Any=7      ,						a_   :						str=4.0      ,						a_   :						Any=True      ,						a_   :						Tuple=0.0      ,						a_   :						Any=0.0      ,						a_   :						int=0.1      ,						a_   :						Dict="gelu"      ,						a_   :						Any=False      ,						a_   :						Union[str, Any]=0.0_2      ,						a_   :						List[str]=1E-5      ,						**a_   :						List[Any]      ,						)			->					Any:
										super().__init__(**__a			)

										snake_case:    Union[str, Any]      							=image_size
										snake_case:    int      							=patch_size
										snake_case:    Optional[Any]      							=num_channels
										snake_case:    Union[str, Any]      							=embed_dim
										snake_case:    List[str]      							=depths
										snake_case:    Optional[Any]      							=len(__a			)
										snake_case:    List[str]      							=num_heads
										snake_case:    Tuple      							=window_size
										snake_case:    List[Any]      							=mlp_ratio
										snake_case:    Tuple      							=qkv_bias
										snake_case:    List[str]      							=hidden_dropout_prob
										snake_case:    Union[str, Any]      							=attention_probs_dropout_prob
										snake_case:    Optional[int]      							=drop_path_rate
										snake_case:    List[Any]      							=hidden_act
										snake_case:    str      							=use_absolute_embeddings
										snake_case:    Any      							=layer_norm_eps
										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
										snake_case:    Dict      							=int(embed_dim * 2 ** (len(__a			) - 1)			)









'''simple docstring'''





from abc import ABC, abstractmethod
from argparse import ArgumentParser



class  snake_case__						(    SCREAMING_SNAKE_CASE_				):
 @staticmethod
 @abstractmethod
 def A_   (   __a						:							ArgumentParser  )      ->   List[str]:







       '''simple docstring'''
       raise NotImplementedError()





 @abstractmethod
 def A_   (   self						:							Optional[Any]  )      ->   Optional[Any]:







       '''simple docstring'''
       raise NotImplementedError()



