


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


__UpperCamelCase     :    Union[str, Any] 	=				logging.get_logger(__name__)

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



class 				_UpperCamelCase			(    A,A    ):

   '''simple docstring'''







   a_					:				int     =			"""convnextv2"""

   def __init__(	self	:			Optional[Any]							,	_lowerCamelCase	:			str=3							,	_lowerCamelCase	:			Any=4							,	_lowerCamelCase	:			List[Any]=4							,	_lowerCamelCase	:			List[Any]=None							,	_lowerCamelCase	:			Tuple=None							,	_lowerCamelCase	:			Dict="gelu"							,	_lowerCamelCase	:			List[Any]=0.02							,	_lowerCamelCase	:			str=1E-12							,	_lowerCamelCase	:			Union[str, Any]=0.0							,	_lowerCamelCase	:			Any=2_2_4							,	_lowerCamelCase	:			Union[str, Any]=None							,	_lowerCamelCase	:			Optional[Any]=None							,	**_lowerCamelCase	:			Dict							,	):






         '''simple docstring'''



         super().__init__(**_lowerCamelCase				)

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







from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


SCREAMING_SNAKE_CASE__     					=			{
    "configuration_owlvit": [
        "OWLVIT_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "OwlViTConfig",
        "OwlViTOnnxConfig",
        "OwlViTTextConfig",
        "OwlViTVisionConfig",
    ],
    "processing_owlvit": ["OwlViTProcessor"],
}


try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		SCREAMING_SNAKE_CASE__     					=			["OwlViTFeatureExtractor"]
		SCREAMING_SNAKE_CASE__     					=			["OwlViTImageProcessor"]

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		SCREAMING_SNAKE_CASE__     					=			[
		    "OWLVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "OwlViTModel",
		    "OwlViTPreTrainedModel",
		    "OwlViTTextModel",
		    "OwlViTVisionModel",
		    "OwlViTForObjectDetection",
		]

if TYPE_CHECKING:
		from .configuration_owlvit import (
		    OWLVIT_PRETRAINED_CONFIG_ARCHIVE_MAP,
		    OwlViTConfig,
		    OwlViTOnnxConfig,
		    OwlViTTextConfig,
		    OwlViTVisionConfig,
		)
		from .processing_owlvit import OwlViTProcessor

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .feature_extraction_owlvit import OwlViTFeatureExtractor
				from .image_processing_owlvit import OwlViTImageProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_owlvit import (
				    OWLVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    OwlViTForObjectDetection,
				    OwlViTModel,
				    OwlViTPreTrainedModel,
				    OwlViTTextModel,
				    OwlViTVisionModel,
				)

else:
		import sys

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






