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 		_lowercase						(					snake_case_       ):
 lowercase				     =   'donut-swin'

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

 def __init__( self	:							List[str]   ,      snake_case	:							Any=2_2_4   ,      snake_case	:							Tuple=4   ,      snake_case	:							Optional[int]=3   ,      snake_case	:							List[Any]=9_6   ,      snake_case	:							Optional[Any]=[2, 2, 6, 2]   ,      snake_case	:							Dict=[3, 6, 1_2, 2_4]   ,      snake_case	:							str=7   ,      snake_case	:							List[str]=4.0   ,      snake_case	:							Dict=True   ,      snake_case	:							Dict=0.0   ,      snake_case	:							Tuple=0.0   ,      snake_case	:							Dict=0.1   ,      snake_case	:							Optional[Any]="gelu"   ,      snake_case	:							Any=False   ,      snake_case	:							List[Any]=0.02   ,      snake_case	:							Optional[int]=1e-5   ,      **snake_case	:							Union[str, Any]   ,      )   ->						Optional[int]:

  """simple docstring"""





  super().__init__(**snake_case			)

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




from maths.prime_check import is_prime





def    __lowercase     (						lowerCamelCase					:     int	):
 if not isinstance(lowerCamelCase  ,  lowerCamelCase	):
  UpperCamelCase_					:						List[str] =					F"Input value of [number={number}] must be an integer"
  raise TypeError(lowerCamelCase	)
 if is_prime(lowerCamelCase	) and is_prime(number + 2	):
  return number + 2
 else:
  return -1


if __name__ == "__main__":
   import doctest

   doctest.testmod()



