


'''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 		_snake_case					(     a__	):
					lowerCAmelCase      :Tuple   =					'''donut-swin'''

					lowerCAmelCase      :Tuple   =					{
					    '''num_attention_heads''': '''num_heads''',
					    '''num_hidden_layers''': '''num_layers''',
					}




					def __init__(      self							,							_lowerCamelCase=224							,							_lowerCamelCase=4							,							_lowerCamelCase=3							,							_lowerCamelCase=96							,							_lowerCamelCase=[2, 2, 6, 2]							,							_lowerCamelCase=[3, 6, 12, 24]							,							_lowerCamelCase=7							,							_lowerCamelCase=4.0							,							_lowerCamelCase=True							,							_lowerCamelCase=0.0							,							_lowerCamelCase=0.0							,							_lowerCamelCase=0.1							,							_lowerCamelCase="gelu"							,							_lowerCamelCase=False							,							_lowerCamelCase=0.02							,							_lowerCamelCase=1e-5							,							**_lowerCamelCase							,							):
								super().__init__(**_lowerCamelCase)

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



'''simple docstring'''



import warnings
from functools import wraps
from typing import Callable







def     _UpperCamelCase      (		UpperCamelCase__					):

			@wraps(UpperCamelCase__					)
			def _inner_fn(*UpperCamelCase__ ,      **UpperCamelCase__					):
						warnings.warn(
						    (f'''\'{fn.__name__}\' is experimental and might be subject to breaking changes in the future.''') ,      UpperCamelCase__ ,      )
						return fn(*UpperCamelCase__ ,      **UpperCamelCase__					)

			return _inner_fn