




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


lowerCamelCase    :		Tuple			   =       logging.get_logger(__name__)

lowerCamelCase    :		int			   =       {
    "facebook/convnextv2-tiny-1k-224": "https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json",
}







class   A(						UpperCamelCase							,				UpperCamelCase       ):



 '''simple docstring'''


 UpperCamelCase						       =						'''convnextv2'''

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

       """simple docstring"""






       super().__init__(**A_  )

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









def       _SCREAMING_SNAKE_CASE      (							lowercase     :	str     ,							lowercase     :	int					):


      '''simple docstring'''



      return [sentence[i : i + ngram_size] for i in range(len(lowercase					) - ngram_size + 1					)]


if __name__ == "__main__":
 from doctest import testmod

 testmod()



