






'''simple docstring'''



from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


SCREAMING_SNAKE_CASE							=						logging.get_logger(__name__)

SCREAMING_SNAKE_CASE							=						{
    'shi-labs/nat-mini-in1k-224': 'https://huggingface.co/shi-labs/nat-mini-in1k-224/resolve/main/config.json',
    # See all Nat models at https://huggingface.co/models?filter=nat
}
class UpperCAmelCase_       (     __A					,							__A					):




      """simple docstring"""




      UpperCamelCase_             =      '''nat'''

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






      def __init__(			self      :		int  ,   UpperCAmelCase      :		Optional[Any]=4  ,   UpperCAmelCase      :		Any=3  ,   UpperCAmelCase      :		List[Any]=64  ,   UpperCAmelCase      :		Dict=[3, 4, 6, 5]  ,   UpperCAmelCase      :		List[str]=[2, 4, 8, 16]  ,   UpperCAmelCase      :		List[Any]=7  ,   UpperCAmelCase      :		Optional[Any]=3.0  ,   UpperCAmelCase      :		List[str]=True  ,   UpperCAmelCase      :		Optional[Any]=0.0  ,   UpperCAmelCase      :		Optional[int]=0.0  ,   UpperCAmelCase      :		Tuple=0.1  ,   UpperCAmelCase      :		Dict="gelu"  ,   UpperCAmelCase      :		Tuple=0.0_2  ,   UpperCAmelCase      :		List[Any]=1e-5  ,   UpperCAmelCase      :		Optional[int]=0.0  ,   UpperCAmelCase      :		Dict=None  ,   UpperCAmelCase      :		Optional[Any]=None  ,   **UpperCAmelCase      :		Tuple  ,   )	->	Dict:


       '''simple docstring'''

       super().__init__(**UpperCAmelCase		)

       lowercase       : str						=patch_size
       lowercase       : List[Any]						=num_channels
       lowercase       : Optional[Any]						=embed_dim
       lowercase       : Any						=depths
       lowercase       : Optional[int]						=len(UpperCAmelCase		)
       lowercase       : Optional[Any]						=num_heads
       lowercase       : List[Any]						=kernel_size
       lowercase       : Optional[Any]						=mlp_ratio
       lowercase       : Tuple						=qkv_bias
       lowercase       : List[Any]						=hidden_dropout_prob
       lowercase       : Dict						=attention_probs_dropout_prob
       lowercase       : Any						=drop_path_rate
       lowercase       : Tuple						=hidden_act
       lowercase       : List[str]						=layer_norm_eps
       lowercase       : Dict						=initializer_range
       # we set the hidden_size attribute in order to make Nat work with VisionEncoderDecoderModel
       # this indicates the channel dimension after the last stage of the model
       lowercase       : Optional[Any]						=int(embed_dim * 2 ** (len(UpperCAmelCase		) - 1)		)
       lowercase       : Optional[int]						=layer_scale_init_value
       lowercase       : int						=['''stem'''] + [f'stage{idx}' for idx in range(1  ,   len(UpperCAmelCase		) + 1		)]
       lowercase	,		lowercase       : Dict						=get_aligned_output_features_output_indices(
           out_features=UpperCAmelCase  ,   out_indices=UpperCAmelCase  ,   stage_names=self.stage_names		)






"""simple docstring"""
from __future__ import annotations

from functools import lru_cache
from math import ceil

_A							=  1_00

_A							=  set(range(3, NUM_PRIMES, 2))
primes.add(2)
_A							=  42

for prime in range(3, ceil(NUM_PRIMES**0.5), 2):
    if prime not in primes:
        continue
    primes.difference_update(set(range(prime * prime, NUM_PRIMES, prime)))




@lru_cache(maxsize=1_00    )
def 					a__						(						lowerCAmelCase    )	-> set[int]:
      if number_to_partition < 0:
            return set()
      elif number_to_partition == 0:
            return {1}

      UpperCAmelCase__			:							set[int]							=    set()
      UpperCAmelCase__			:							int
      UpperCAmelCase__			:							int

      for prime in primes:
            if prime > number_to_partition:
                  continue
            for sub in partition(number_to_partition - prime    ):
                  ret.add(sub * prime    )

      return ret




def 					a__						(						lowerCAmelCase = 50_00    )	-> int | None:
      for number_to_partition in range(1			,	lowerCAmelCase    ):
            if len(partition(lowerCAmelCase    )    ) > number_unique_partitions:
                  return number_to_partition
      return None


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

