'''simple docstring'''





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


SCREAMING_SNAKE_CASE_:     Optional[Any]  =logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_:     List[Any]  ={
    'facebook/convnextv2-tiny-1k-224': 'https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json',
}




class        __A      ( UpperCamelCase__		,	UpperCamelCase__	):
    a__       :						int          =  """convnextv2"""



    def __init__(self    :    Tuple   ,			__a    :    Any=3   ,			__a    :    List[Any]=4   ,			__a    :    List[Any]=4   ,			__a    :    str=None   ,			__a    :    Union[str, Any]=None   ,			__a    :    Any="gelu"   ,			__a    :    str=0.02   ,			__a    :    str=1E-12   ,			__a    :    str=0.0   ,			__a    :    str=224   ,			__a    :    Optional[Any]=None   ,			__a    :    Union[str, Any]=None   ,			**__a    :    Tuple   ,			):
         super().__init__(**__a )

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









"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


__a      =				{
    "configuration_altclip": [
        "ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "AltCLIPConfig",
        "AltCLIPTextConfig",
        "AltCLIPVisionConfig",
    ],
    "processing_altclip": ["AltCLIPProcessor"],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__a      =				[
						    "ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "AltCLIPPreTrainedModel",
						    "AltCLIPModel",
						    "AltCLIPTextModel",
						    "AltCLIPVisionModel",
						]


if TYPE_CHECKING:
						from .configuration_altclip import (
						    ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    AltCLIPConfig,
						    AltCLIPTextConfig,
						    AltCLIPVisionConfig,
						)
						from .processing_altclip import AltCLIPProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_altclip import (
												    ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
												    AltCLIPModel,
												    AltCLIPPreTrainedModel,
												    AltCLIPTextModel,
												    AltCLIPVisionModel,
												)


else:
						import sys

						__a      =				_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
