





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


__lowerCamelCase			:	Union[str, Any]					    =	logging.get_logger(__name__)

__lowerCamelCase			:	Tuple					    =	{
    """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__  (			__snake_case     ):
      _UpperCAmelCase      :Any		       =  'donut-swin'

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





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




       super().__init__(**A_  )

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







def 						A_							(	_lowerCAmelCase	)		->					bool:
 return str(_lowerCAmelCase	) == str(_lowerCAmelCase	)[::-1]



def 						A_							(	_lowerCAmelCase	)		->					int:
 return int(_lowerCAmelCase	) + int(str(_lowerCAmelCase	)[::-1]	)



def 						A_							(	_lowerCAmelCase = 1_0000	)		->					int:
 UpperCamelCase      :   List[Any]			      =  []
 for num in range(1				,  _lowerCAmelCase	):
  UpperCamelCase      :   Union[str, Any]			      =  0
  UpperCamelCase      :   List[str]			      =  num
  while iterations < 50:
   UpperCamelCase      :   int			      =  sum_reverse(_lowerCAmelCase	)
   iterations += 1
   if is_palindrome(_lowerCAmelCase	):
    break
  else:
   lychrel_nums.append(_lowerCAmelCase	)
 return len(_lowerCAmelCase	)


if __name__ == "__main__":
    print(f"""{solution() = }""")
