
"""simple docstring"""




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


lowerCAmelCase__							=				logging.get_logger(__name__)

lowerCAmelCase__							=				{
    '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     (							__lowercase   ):
							UpperCAmelCase__						     =      '''donut-swin'''

							UpperCAmelCase__						     =      {
							    '''num_attention_heads''': '''num_heads''',
							    '''num_hidden_layers''': '''num_layers''',
							}

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

									"""simple docstring"""







									super().__init__(**SCREAMING_SNAKE_CASE_    )

									SCREAMING_SNAKE_CASE_						 = image_size
									SCREAMING_SNAKE_CASE_						 = patch_size
									SCREAMING_SNAKE_CASE_						 = num_channels
									SCREAMING_SNAKE_CASE_						 = embed_dim
									SCREAMING_SNAKE_CASE_						 = depths
									SCREAMING_SNAKE_CASE_						 = len(SCREAMING_SNAKE_CASE_    )
									SCREAMING_SNAKE_CASE_						 = num_heads
									SCREAMING_SNAKE_CASE_						 = window_size
									SCREAMING_SNAKE_CASE_						 = mlp_ratio
									SCREAMING_SNAKE_CASE_						 = qkv_bias
									SCREAMING_SNAKE_CASE_						 = hidden_dropout_prob
									SCREAMING_SNAKE_CASE_						 = attention_probs_dropout_prob
									SCREAMING_SNAKE_CASE_						 = drop_path_rate
									SCREAMING_SNAKE_CASE_						 = hidden_act
									SCREAMING_SNAKE_CASE_						 = use_absolute_embeddings
									SCREAMING_SNAKE_CASE_						 = layer_norm_eps
									SCREAMING_SNAKE_CASE_						 = 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_						 = int(embed_dim * 2 ** (len(SCREAMING_SNAKE_CASE_    ) - 1)    )

"""simple docstring"""




def        _lowerCamelCase ( __a    ):

		if not isinstance(__a,							__a    ):
				SCREAMING_SNAKE_CASE_						 = F'Input value of [number={number}] must be an integer'
				raise TypeError(__a    )

		if number < 1:
				SCREAMING_SNAKE_CASE_						 = F'Input value of [number={number}] must be > 0'
				raise ValueError(__a    )

		SCREAMING_SNAKE_CASE_						 = 1

		for i in range(1,							__a    ):
				current_number *= 4 * i - 2
				current_number //= i + 1

		return current_number


if __name__ == "__main__":
						import doctest

						doctest.testmod()