



'''simple docstring'''





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


A__    :   int           =					logging.get_logger(__name__)

A__    :   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  snake_case__						(    SCREAMING_SNAKE_CASE_				):
 A__				= '''donut-swin'''

 A__				= {
     '''num_attention_heads''': '''num_heads''',
     '''num_hidden_layers''': '''num_layers''',
 }
 def __init__(   self						:							int      ,     __a						:							Any=224      ,     __a						:							Tuple=4      ,     __a						:							Union[str, Any]=3      ,     __a						:							Tuple=96      ,     __a						:							int=[2, 2, 6, 2]      ,     __a						:							List[str]=[3, 6, 12, 24]      ,     __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:







       '''simple docstring'''
       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()



