code: 
  '''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
  
  
  lowercase__						=			logging.get_logger(__name__)
  
  lowercase__						=			{
      "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   snake_case__					(			__SCREAMING_SNAKE_CASE						,				__SCREAMING_SNAKE_CASE				):
  
  
  
  
  
  
  
    """simple docstring"""
  
    lowerCamelCase           =	"""convnext"""
  
  
  
    def __init__(			self							: Dict     ,  UpperCamelCase__							: Optional[int]=3     ,  UpperCamelCase__							: List[str]=4     ,  UpperCamelCase__							: List[Any]=4     ,  UpperCamelCase__							: str=None     ,  UpperCamelCase__							: Optional[int]=None     ,  UpperCamelCase__							: Tuple="gelu"     ,  UpperCamelCase__							: List[Any]=0.02     ,  UpperCamelCase__							: Tuple=1e-1_2     ,  UpperCamelCase__							: Tuple=1e-6     ,  UpperCamelCase__							: int=0.0     ,  UpperCamelCase__							: Optional[Any]=224     ,  UpperCamelCase__							: Union[str, Any]=None     ,  UpperCamelCase__							: int=None     ,  **UpperCamelCase__							: List[Any]     ,  )	-> Dict:
  
  
  
  
  
  
      """simple docstring"""
  
  
  
  
  
  
  
      super().__init__(**UpperCamelCase__			)
  
      snake_case     :					Union[str, Any]     =	num_channels
      snake_case     :					Any     =	patch_size
      snake_case     :					Any     =	num_stages
      snake_case     :					int     =	[96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
      snake_case     :					Optional[Any]     =	[3, 3, 9, 3] if depths is None else depths
      snake_case     :					int     =	hidden_act
      snake_case     :					Tuple     =	initializer_range
      snake_case     :					str     =	layer_norm_eps
      snake_case     :					List[Any]     =	layer_scale_init_value
      snake_case     :					str     =	drop_path_rate
      snake_case     :					Optional[Any]     =	image_size
      snake_case     :					Optional[int]     =	['''stem'''] + [f'stage{idx}' for idx in range(1     ,  len(self.depths			) + 1			)]
      snake_case     :					List[str]     =	get_aligned_output_features_output_indices(
          out_features=UpperCamelCase__     ,  out_indices=UpperCamelCase__     ,  stage_names=self.stage_names			)
  
  
  
  
  
  
  
  class   snake_case__					(			__SCREAMING_SNAKE_CASE				):
  
  
  
  
  
  
  
    """simple docstring"""
  
    lowerCamelCase           =	version.parse("""1.11"""				)
  
  
  
    @property
    def 			lowerCAmelCase							(			self							: Union[str, Any]			)	-> Mapping[str, Mapping[int, str]]:
  
  
  
  
  
  
      """simple docstring"""
  
  
  
  
  
  
  
      return OrderedDict(
          [
              ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
          ]			)
  
  
  
    @property
    def 			lowerCAmelCase							(			self							: Optional[int]			)	-> float:
  
  
  
  
  
  
      """simple docstring"""
  
  
  
  
  
  
  
      return 1e-5
  
  
  
style_context: 
  '''simple docstring'''
  from typing import TYPE_CHECKING
  
  from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available
  
  
  lowercase__						=			{
      "configuration_flava": [
          "FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP",
          "FlavaConfig",
          "FlavaImageCodebookConfig",
          "FlavaImageConfig",
          "FlavaMultimodalConfig",
          "FlavaTextConfig",
      ],
  }
  
  try:
  						if not is_vision_available():
  												raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
  						pass
  else:
  						lowercase__						=			["FlavaFeatureExtractor"]
  						lowercase__						=			["FlavaImageProcessor"]
  						lowercase__						=			["FlavaProcessor"]
  
  try:
  						if not is_torch_available():
  												raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
  						pass
  else:
  						lowercase__						=			[
  						    "FLAVA_PRETRAINED_MODEL_ARCHIVE_LIST",
  						    "FlavaForPreTraining",
  						    "FlavaImageCodebook",
  						    "FlavaImageModel",
  						    "FlavaModel",
  						    "FlavaMultimodalModel",
  						    "FlavaPreTrainedModel",
  						    "FlavaTextModel",
  						]
  
  if TYPE_CHECKING:
  						from .configuration_flava import (
  						    FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP,
  						    FlavaConfig,
  						    FlavaImageCodebookConfig,
  						    FlavaImageConfig,
  						    FlavaMultimodalConfig,
  						    FlavaTextConfig,
  						)
  
  						try:
  												if not is_vision_available():
  																		raise OptionalDependencyNotAvailable()
  						except OptionalDependencyNotAvailable:
  												pass
  						else:
  												from .feature_extraction_flava import FlavaFeatureExtractor
  												from .image_processing_flava import FlavaImageProcessor
  												from .processing_flava import FlavaProcessor
  
  						try:
  												if not is_torch_available():
  																		raise OptionalDependencyNotAvailable()
  						except OptionalDependencyNotAvailable:
  												pass
  						else:
  												from .modeling_flava import (
  												    FLAVA_PRETRAINED_MODEL_ARCHIVE_LIST,
  												    FlavaForPreTraining,
  												    FlavaImageCodebook,
  												    FlavaImageModel,
  												    FlavaModel,
  												    FlavaMultimodalModel,
  												    FlavaPreTrainedModel,
  												    FlavaTextModel,
  												)
  
  else:
  						import sys
  
  						lowercase__						=			_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
  
  
  