



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,
)


A__  :  Any								=					{
    '''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:
						A__  :  Union[str, Any]								=					['''OwlViTFeatureExtractor''']
						A__  :  Optional[int]								=					['''OwlViTImageProcessor''']

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A__  :  Any								=					[
						    '''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

						A__  :  Optional[Any]								=					_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)









'''simple docstring'''

from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCamelCase							:   Tuple  						=	logging.get_logger(__name__)

lowerCamelCase							:   Dict  						=	{
    'microsoft/cvt-13': 'https://huggingface.co/microsoft/cvt-13/resolve/main/config.json',
    # See all Cvt models at https://huggingface.co/models?filter=cvt
}
class   __lowerCAmelCase						(lowercase_     ):





      '''simple docstring'''






      lowerCAmelCase__					:     Tuple  					=							"""cvt"""



      def __init__(self    :    int   ,						UpperCamelCase    :    List[Any]=3   ,						UpperCamelCase    :    int=[7, 3, 3]   ,						UpperCamelCase    :    str=[4, 2, 2]   ,						UpperCamelCase    :    Dict=[2, 1, 1]   ,						UpperCamelCase    :    Dict=[64, 192, 384]   ,						UpperCamelCase    :    Dict=[1, 3, 6]   ,						UpperCamelCase    :    Dict=[1, 2, 10]   ,						UpperCamelCase    :    Any=[4.0, 4.0, 4.0]   ,						UpperCamelCase    :    Optional[int]=[0.0, 0.0, 0.0]   ,						UpperCamelCase    :    Optional[int]=[0.0, 0.0, 0.0]   ,						UpperCamelCase    :    int=[0.0, 0.0, 0.1]   ,						UpperCamelCase    :    Any=[True, True, True]   ,						UpperCamelCase    :    int=[False, False, True]   ,						UpperCamelCase    :    Union[str, Any]=["dw_bn", "dw_bn", "dw_bn"]   ,						UpperCamelCase    :    Optional[int]=[3, 3, 3]   ,						UpperCamelCase    :    Tuple=[1, 1, 1]   ,						UpperCamelCase    :    Any=[2, 2, 2]   ,						UpperCamelCase    :    Dict=[1, 1, 1]   ,						UpperCamelCase    :    List[str]=[1, 1, 1]   ,						UpperCamelCase    :    str=0.02   ,						UpperCamelCase    :    int=1E-12   ,						**UpperCamelCase    :    Union[str, Any]   ,						):

             '''simple docstring'''







             super().__init__(**UpperCamelCase )
             lowercase__      			= num_channels
             lowercase__      			= patch_sizes
             lowercase__      			= patch_stride
             lowercase__      			= patch_padding
             lowercase__      			= embed_dim
             lowercase__      			= num_heads
             lowercase__      			= depth
             lowercase__      			= mlp_ratio
             lowercase__      			= attention_drop_rate
             lowercase__      			= drop_rate
             lowercase__      			= drop_path_rate
             lowercase__      			= qkv_bias
             lowercase__      			= cls_token
             lowercase__      			= qkv_projection_method
             lowercase__      			= kernel_qkv
             lowercase__      			= padding_kv
             lowercase__      			= stride_kv
             lowercase__      			= padding_q
             lowercase__      			= stride_q
             lowercase__      			= initializer_range
             lowercase__      			= layer_norm_eps




