
from collections import OrderedDict
from typing import List, Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__lowerCAmelCase									=logging.get_logger(__name__)

__lowerCAmelCase									={
    "google/efficientnet-b7": "https://huggingface.co/google/efficientnet-b7/resolve/main/config.json",
}


class  __magic_name__						(     _a):
	_UpperCAmelCase	:			Dict		   =     'efficientnet'





	def __init__(		self	: int    ,__SCREAMING_SNAKE_CASE	: List[str] = 3    ,__SCREAMING_SNAKE_CASE	: List[str] = 6_0_0    ,__SCREAMING_SNAKE_CASE	: Tuple = 2.0    ,__SCREAMING_SNAKE_CASE	: List[str] = 3.1    ,__SCREAMING_SNAKE_CASE	: Tuple = 8    ,__SCREAMING_SNAKE_CASE	: Optional[Any] = [3, 3, 5, 3, 5, 5, 3]    ,__SCREAMING_SNAKE_CASE	: Optional[int] = [3_2, 1_6, 2_4, 4_0, 8_0, 1_1_2, 1_9_2]    ,__SCREAMING_SNAKE_CASE	: List[Any] = [1_6, 2_4, 4_0, 8_0, 1_1_2, 1_9_2, 3_2_0]    ,__SCREAMING_SNAKE_CASE	: Optional[int] = []    ,__SCREAMING_SNAKE_CASE	: Dict = [1, 2, 2, 2, 1, 2, 1]    ,__SCREAMING_SNAKE_CASE	: List[Any] = [1, 2, 2, 3, 3, 4, 1]    ,__SCREAMING_SNAKE_CASE	: Optional[int] = [1, 6, 6, 6, 6, 6, 6]    ,__SCREAMING_SNAKE_CASE	: Optional[Any] = 0.25    ,__SCREAMING_SNAKE_CASE	: Union[str, Any] = "swish"    ,__SCREAMING_SNAKE_CASE	: str = 2_5_6_0    ,__SCREAMING_SNAKE_CASE	: List[str] = "mean"    ,__SCREAMING_SNAKE_CASE	: Optional[int] = 0.02    ,__SCREAMING_SNAKE_CASE	: Optional[int] = 0.001    ,__SCREAMING_SNAKE_CASE	: List[str] = 0.99    ,__SCREAMING_SNAKE_CASE	: List[Any] = 0.5    ,__SCREAMING_SNAKE_CASE	: str = 0.2    ,**__SCREAMING_SNAKE_CASE	: Union[str, Any]    ,):
						super().__init__(**A_       )

						UpperCAmelCase				   =  num_channels
						UpperCAmelCase				   =  image_size
						UpperCAmelCase				   =  width_coefficient
						UpperCAmelCase				   =  depth_coefficient
						UpperCAmelCase				   =  depth_divisor
						UpperCAmelCase				   =  kernel_sizes
						UpperCAmelCase				   =  in_channels
						UpperCAmelCase				   =  out_channels
						UpperCAmelCase				   =  depthwise_padding
						UpperCAmelCase				   =  strides
						UpperCAmelCase				   =  num_block_repeats
						UpperCAmelCase				   =  expand_ratios
						UpperCAmelCase				   =  squeeze_expansion_ratio
						UpperCAmelCase				   =  hidden_act
						UpperCAmelCase				   =  hidden_dim
						UpperCAmelCase				   =  pooling_type
						UpperCAmelCase				   =  initializer_range
						UpperCAmelCase				   =  batch_norm_eps
						UpperCAmelCase				   =  batch_norm_momentum
						UpperCAmelCase				   =  dropout_rate
						UpperCAmelCase				   =  drop_connect_rate
						UpperCAmelCase				   =  sum(A_       ) * 4







class  __magic_name__						(     _a):
	_UpperCAmelCase	:			Optional[int]		   =     version.parse('1.11')





	@property
	def 	_UpperCAmelCase						(		self	: List[str]       ):
						return OrderedDict(
						    [
						        ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
						    ]       )





	@property
	def 	_UpperCAmelCase						(		self	: Optional[Any]       ):
						return 1e-5









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


UpperCamelCase_												=	{
    '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:
    UpperCamelCase_												=	['OwlViTFeatureExtractor']
    UpperCamelCase_												=	['OwlViTImageProcessor']

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

    UpperCamelCase_												=	_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



