





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_						       =	{
    "facebook/convnextv2-tiny-1k-224": "https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json",
}

class 		UpperCamelCase__			(				lowerCAmelCase_							,				lowerCAmelCase_       ):



     '''simple docstring'''

     __snake_case   :     Optional[int]		     =      "convnextv2"






     def __init__(							self						:   int						,lowerCamelCase__						:   Optional[int]=3						,lowerCamelCase__						:   Tuple=4						,lowerCamelCase__						:   Optional[int]=4						,lowerCamelCase__						:   Optional[Any]=None						,lowerCamelCase__						:   Optional[Any]=None						,lowerCamelCase__						:   Optional[Any]="gelu"						,lowerCamelCase__						:   List[str]=0.02						,lowerCamelCase__						:   str=1e-1_2						,lowerCamelCase__						:   int=0.0						,lowerCamelCase__						:   Dict=224						,lowerCamelCase__						:   Any=None						,lowerCamelCase__						:   Optional[Any]=None						,**lowerCamelCase__						:   Union[str, Any]						,)					->		List[Any]:




           '''simple docstring'''


           super().__init__(**lowerCamelCase_	)

           SCREAMING_SNAKE_CASE		=						num_channels
           SCREAMING_SNAKE_CASE		=						patch_size
           SCREAMING_SNAKE_CASE		=						num_stages
           SCREAMING_SNAKE_CASE		=						[96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
           SCREAMING_SNAKE_CASE		=						[3, 3, 9, 3] if depths is None else depths
           SCREAMING_SNAKE_CASE		=						hidden_act
           SCREAMING_SNAKE_CASE		=						initializer_range
           SCREAMING_SNAKE_CASE		=						layer_norm_eps
           SCREAMING_SNAKE_CASE		=						drop_path_rate
           SCREAMING_SNAKE_CASE		=						image_size
           SCREAMING_SNAKE_CASE		=						["""stem"""] + [F"""stage{idx}""" for idx in range(1						,len(self.depths	) + 1	)]
           SCREAMING_SNAKE_CASE, SCREAMING_SNAKE_CASE		=						get_aligned_output_features_output_indices(
               out_features=lowerCamelCase_						,out_indices=lowerCamelCase_						,stage_names=self.stage_names	)









def        __lowercase       (				_SCREAMING_SNAKE_CASE = 1			,						_SCREAMING_SNAKE_CASE = 10_00     )			->       int:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE		=						1
      SCREAMING_SNAKE_CASE		=						0

      for divide_by_number in range(_SCREAMING_SNAKE_CASE			,						digit + 1     ):
            SCREAMING_SNAKE_CASE		=						[]
            SCREAMING_SNAKE_CASE		=						numerator
            for _ in range(1			,						digit + 1     ):
                  if now_divide in has_been_divided:
                        if longest_list_length < len(_SCREAMING_SNAKE_CASE     ):
                              SCREAMING_SNAKE_CASE		=						len(_SCREAMING_SNAKE_CASE     )
                              SCREAMING_SNAKE_CASE		=						divide_by_number
                  else:
                        has_been_divided.append(_SCREAMING_SNAKE_CASE     )
                        SCREAMING_SNAKE_CASE		=						now_divide * 10 % divide_by_number

      return the_digit


# Tests
if __name__ == "__main__":
      import doctest

      doctest.testmod()


