





"""simple docstring"""
from collections import OrderedDict
from typing import Mapping

from packaging import version

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


lowerCamelCase_          =	logging.get_logger(__name__)

lowerCamelCase_          =	{
    "facebook/convnext-tiny-224": "https://huggingface.co/facebook/convnext-tiny-224/resolve/main/config.json",
    # See all ConvNeXT models at https://huggingface.co/models?filter=convnext
}






class       _SCREAMING_SNAKE_CASE(     lowerCAmelCase_					,			lowerCAmelCase_						):
       SCREAMING_SNAKE_CASE_     :   str					=						'convnext'




       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.0_2	,SCREAMING_SNAKE_CASE__=1E-12	,SCREAMING_SNAKE_CASE__=1E-6	,SCREAMING_SNAKE_CASE__=0.0	,SCREAMING_SNAKE_CASE__=2_24	,SCREAMING_SNAKE_CASE__=None	,SCREAMING_SNAKE_CASE__=None	,**SCREAMING_SNAKE_CASE__	,)    ->   int:





             """simple docstring"""






             super().__init__(**lowerCamelCase_							)

             __SCREAMING_SNAKE_CASE     :List[str]	       =						num_channels
             __SCREAMING_SNAKE_CASE     :int	       =						patch_size
             __SCREAMING_SNAKE_CASE     :Optional[Any]	       =						num_stages
             __SCREAMING_SNAKE_CASE     :Tuple	       =						[96, 1_92, 3_84, 7_68] if hidden_sizes is None else hidden_sizes
             __SCREAMING_SNAKE_CASE     :Optional[int]	       =						[3, 3, 9, 3] if depths is None else depths
             __SCREAMING_SNAKE_CASE     :Union[str, Any]	       =						hidden_act
             __SCREAMING_SNAKE_CASE     :Optional[Any]	       =						initializer_range
             __SCREAMING_SNAKE_CASE     :Optional[int]	       =						layer_norm_eps
             __SCREAMING_SNAKE_CASE     :List[str]	       =						layer_scale_init_value
             __SCREAMING_SNAKE_CASE     :Tuple	       =						drop_path_rate
             __SCREAMING_SNAKE_CASE     :Optional[int]	       =						image_size
             __SCREAMING_SNAKE_CASE     :List[str]	       =						['''stem'''] + [f'''stage{idx}''' for idx in range(1	,len(self.depths							) + 1							)]
             __SCREAMING_SNAKE_CASE       ,__SCREAMING_SNAKE_CASE     :Any	       =						get_aligned_output_features_output_indices(
                 out_features=lowerCamelCase_	,out_indices=lowerCamelCase_	,stage_names=self.stage_names							)






class       _SCREAMING_SNAKE_CASE(     lowerCAmelCase_						):
       SCREAMING_SNAKE_CASE_     :   Tuple					=						version.parse('''1.11'''						)




       @property
       def 					_UpperCamelCase  (		self							)    ->   str:





             """simple docstring"""






             return OrderedDict(
                 [
                     ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
                 ]							)




       @property
       def 					_UpperCamelCase  (		self							)    ->   str:





             """simple docstring"""






             return 1E-5






"""simple docstring"""
def   __lowerCamelCase     (							a_  :	str							)    ->   int:
      __SCREAMING_SNAKE_CASE     :List[Any]	       =						0
      for plain_chr in plain_text:
            __SCREAMING_SNAKE_CASE     :List[str]	       =						(
                ord(a_							) + (hash_value << 6) + (hash_value << 16) - hash_value
            )
      return hash_value