
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


UpperCamelCase_     			=       logging.get_logger(__name__)

UpperCamelCase_     			=       {
    """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   a_  (__SCREAMING_SNAKE_CASE							,			__SCREAMING_SNAKE_CASE    ):
       __lowerCAmelCase    :				Optional[int]    =      """convnext"""




       def __init__(     self   ,   snake_case_=3   ,   snake_case_=4   ,   snake_case_=4   ,   snake_case_=None   ,   snake_case_=None   ,   snake_case_="gelu"   ,   snake_case_=0.02   ,   snake_case_=1E-12   ,   snake_case_=1E-6   ,   snake_case_=0.0   ,   snake_case_=2_2_4   ,   snake_case_=None   ,   snake_case_=None   ,   **snake_case_   ,   ):
         super().__init__(**UpperCamelCase__  )

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



class   a_  (__SCREAMING_SNAKE_CASE    ):
       __lowerCAmelCase    :				List[Any]    =      version.parse("""1.11"""    )




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







       @property
       def 							__UpperCamelCase       (     self  ):
         return 1E-5




'''simple docstring'''

from ..utils import DummyObject, requires_backends


class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				str    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				str    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				int    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[str]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Any    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				str    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Union[str, Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Union[str, Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Dict    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Tuple    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[int]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Union[str, Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Union[str, Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[int]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Dict    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[str]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Dict    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[str]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Any    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				str    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Union[str, Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Any    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				str    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Union[str, Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[str]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Dict    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Dict    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				int    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Union[str, Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[int]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				int    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Any    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				str    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				int    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[int]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				List[str]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Union[str, Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Any    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )



class   a_  (metaclass=_a    ):
       __lowerCAmelCase    :				Optional[Any]    =      ["""tokenizers"""]




       def __init__(     self   ,   *snake_case_   ,   **snake_case_  ):
         requires_backends(self   ,   ["""tokenizers"""]  )


