


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


lowerCAmelCase__    :List[Any]       =				logging.get_logger(__name__)

lowerCAmelCase__    :List[str]       =				{
    '''facebook/convnextv2-tiny-1k-224''': '''https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json''',
}

class 						__a (							snake_case_       , snake_case_     ):
		_a      :    Optional[int]           =      '''convnextv2'''
		def __init__(     self     ,       _SCREAMING_SNAKE_CASE=3     ,       _SCREAMING_SNAKE_CASE=4     ,       _SCREAMING_SNAKE_CASE=4     ,       _SCREAMING_SNAKE_CASE=None     ,       _SCREAMING_SNAKE_CASE=None     ,       _SCREAMING_SNAKE_CASE="gelu"     ,       _SCREAMING_SNAKE_CASE=0.02     ,       _SCREAMING_SNAKE_CASE=1e-1_2     ,       _SCREAMING_SNAKE_CASE=0.0     ,       _SCREAMING_SNAKE_CASE=224     ,       _SCREAMING_SNAKE_CASE=None     ,       _SCREAMING_SNAKE_CASE=None     ,       **_SCREAMING_SNAKE_CASE     ,       )					->			Optional[int]:




									"""simple docstring"""





									super().__init__(**__snake_case		)

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







'''simple docstring'''






def   UpperCamelCase__ (						lowerCAmelCase    ):





      """simple docstring"""


      if not isinstance(lowerCAmelCase				,      lowerCAmelCase    ):
            raise ValueError("""Input must be an integer"""    )
      if input_num <= 0:
            raise ValueError("""Input must be positive"""    )
      return sum(
          divisor for divisor in range(1				,      input_num // 2 + 1    ) if input_num % divisor == 0    )


if __name__ == "__main__":
      import doctest

      doctest.testmod()






