




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


_lowerCamelCase     :		Optional[int]								=       logging.get_logger(__name__)

_lowerCamelCase     :		Union[str, Any]								=       {
    """facebook/convnextv2-tiny-1k-224""": """https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json""",
}


class     UpperCamelCase_   (			UpperCAmelCase__		, UpperCAmelCase__					):

    '''simple docstring'''






    UpperCAmelCase__							  =				'''convnextv2'''


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





           '''simple docstring'''

           super().__init__(**UpperCAmelCase__)

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








from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


_lowerCamelCase     :		Union[str, Any]								=       {
    """configuration_swiftformer""": [
        """SWIFTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """SwiftFormerConfig""",
        """SwiftFormerOnnxConfig""",
    ]
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _lowerCamelCase     :		Union[str, Any]								=       [
      """SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """SwiftFormerForImageClassification""",
      """SwiftFormerModel""",
      """SwiftFormerPreTrainedModel""",
  ]

if TYPE_CHECKING:
  from .configuration_swiftformer import (
      SWIFTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
      SwiftFormerConfig,
      SwiftFormerOnnxConfig,
  )

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_swiftformer import (
        SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
        SwiftFormerForImageClassification,
        SwiftFormerModel,
        SwiftFormerPreTrainedModel,
    )

else:
  import sys

  _lowerCamelCase     :		str								=       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


