


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


__UpperCamelCase				:  int      					=							logging.get_logger(__name__)

__UpperCamelCase				:  Any      					=							{
    '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  lowerCAmelCase__(    __lowerCAmelCase						):






    '''simple docstring'''





    A_  :     Optional[int]			= '''donut-swin'''

    A_  :     str			= {
        '''num_attention_heads''': '''num_heads''',
        '''num_hidden_layers''': '''num_layers''',
    }





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





       '''simple docstring'''
       super().__init__(**lowerCAmelCase_	)

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



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


__UpperCamelCase				:  int      					=							logging.get_logger(__name__)

__UpperCamelCase				:  Union[str, Any]      					=							{
    'facebook/timesformer': 'https://huggingface.co/facebook/timesformer/resolve/main/config.json',
}





class  lowerCAmelCase__(    snake_case__						):






    '''simple docstring'''





    A_  :     str			= 'timesformer'





    def __init__(	self				:   int       ,   __snake_case				:   Any=224       ,   __snake_case				:   str=16       ,   __snake_case				:   Any=3       ,   __snake_case				:   List[Any]=8       ,   __snake_case				:   Dict=768       ,   __snake_case				:   Dict=12       ,   __snake_case				:   Tuple=12       ,   __snake_case				:   Dict=3_072       ,   __snake_case				:   str="gelu"       ,   __snake_case				:   Union[str, Any]=0.0       ,   __snake_case				:   List[Any]=0.0       ,   __snake_case				:   Tuple=0.02       ,   __snake_case				:   Optional[Any]=1E-6       ,   __snake_case				:   List[Any]=True       ,   __snake_case				:   List[str]="divided_space_time"       ,   __snake_case				:   Optional[int]=0       ,   **__snake_case				:   Dict       ,   ):





       '''simple docstring'''
       super().__init__(**__snake_case	)

       UpperCAmelCase_							:      Optional[int]						=   image_size
       UpperCAmelCase_							:      Optional[Any]						=   patch_size
       UpperCAmelCase_							:      Any						=   num_channels
       UpperCAmelCase_							:      int						=   num_frames

       UpperCAmelCase_							:      List[Any]						=   hidden_size
       UpperCAmelCase_							:      Any						=   num_hidden_layers
       UpperCAmelCase_							:      Dict						=   num_attention_heads
       UpperCAmelCase_							:      List[Any]						=   intermediate_size
       UpperCAmelCase_							:      str						=   hidden_act
       UpperCAmelCase_							:      List[str]						=   hidden_dropout_prob
       UpperCAmelCase_							:      List[str]						=   attention_probs_dropout_prob
       UpperCAmelCase_							:      Optional[int]						=   initializer_range
       UpperCAmelCase_							:      List[str]						=   layer_norm_eps
       UpperCAmelCase_							:      str						=   qkv_bias

       UpperCAmelCase_							:      Dict						=   attention_type
       UpperCAmelCase_							:      str						=   drop_path_rate