





"""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


__magic_name__					:				str	= logging.get_logger(__name__)

__magic_name__					:				Dict	= {
    """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        lowercase__ (      __SCREAMING_SNAKE_CASE				,    __SCREAMING_SNAKE_CASE  ):

   """simple docstring"""
   __lowerCAmelCase    :							List[str]								=     """convnext"""







   def __init__(			self	,      _A=3	,      _A=4	,      _A=4	,      _A=None	,      _A=None	,      _A="gelu"	,      _A=0.02	,      _A=1e-1_2	,      _A=1e-6	,      _A=0.0	,      _A=2_2_4	,      _A=None	,      _A=None	,      **_A	,      ):






         '''simple docstring'''







         super().__init__(**_A						)

         UpperCamelCase							:		Optional[int]							      = num_channels
         UpperCamelCase							:		Optional[Any]							      = patch_size
         UpperCamelCase							:		Dict							      = num_stages
         UpperCamelCase							:		Any							      = [9_6, 1_9_2, 3_8_4, 7_6_8] if hidden_sizes is None else hidden_sizes
         UpperCamelCase							:		Dict							      = [3, 3, 9, 3] if depths is None else depths
         UpperCamelCase							:		Any							      = hidden_act
         UpperCamelCase							:		Union[str, Any]							      = initializer_range
         UpperCamelCase							:		List[str]							      = layer_norm_eps
         UpperCamelCase							:		Dict							      = layer_scale_init_value
         UpperCamelCase							:		Dict							      = drop_path_rate
         UpperCamelCase							:		Any							      = image_size
         UpperCamelCase							:		List[Any]							      = ["""stem"""] + [f"""stage{idx}""" for idx in range(1	,      len(self.depths						) + 1						)]
         UpperCamelCase							:		str							      = get_aligned_output_features_output_indices(
             out_features=_A	,      out_indices=_A	,      stage_names=self.stage_names						)






class        lowercase__ (      __SCREAMING_SNAKE_CASE  ):

   """simple docstring"""
   __lowerCAmelCase    :							str								=     version.parse("""1.11"""  )







   @property
   def      _a			(			self						):






         '''simple docstring'''







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







   @property
   def      _a			(			self						):






         '''simple docstring'''







         return 1e-5










"""simple docstring"""


from transformers import PretrainedConfig






class        lowercase__ (      __SCREAMING_SNAKE_CASE  ):

			"""simple docstring"""
			__lowerCAmelCase    :							Optional[int]								=     """custom"""







			def __init__(			self	,      _A=1	,      **_A						):






									'''simple docstring'''







									UpperCamelCase							:		str							      = attribute
									super().__init__(**_A						)






class        lowercase__ (      __SCREAMING_SNAKE_CASE  ):

			"""simple docstring"""
			__lowerCAmelCase    :							Any								=     """custom"""







			def __init__(			self	,      _A=1	,      **_A						):






									'''simple docstring'''







									UpperCamelCase							:		Any							      = attribute



