




from collections import OrderedDict
from typing import Mapping

from packaging import version

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


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

__lowerCAmelCase	:       Optional[Any]     =	{
    'google/mobilenet_v1_1.0_224': 'https://huggingface.co/google/mobilenet_v1_1.0_224/resolve/main/config.json',
    'google/mobilenet_v1_0.75_192': 'https://huggingface.co/google/mobilenet_v1_0.75_192/resolve/main/config.json',
    # See all MobileNetV1 models at https://huggingface.co/models?filter=mobilenet_v1
}




class 					snake_case__							(_UpperCamelCase     ):
				"""simple docstring"""



				SCREAMING_SNAKE_CASE_ :							Union[str, Any]											=      """mobilenet_v1"""





				def __init__(   self       :  Tuple      ,   __lowerCamelCase       :  Any=3      ,   __lowerCamelCase       :  Any=2_24      ,   __lowerCamelCase       :  Union[str, Any]=1.0      ,   __lowerCamelCase       :  List[str]=8      ,   __lowerCamelCase       :  List[Any]="relu6"      ,   __lowerCamelCase       :  int=True      ,   __lowerCamelCase       :  str=0.999      ,   __lowerCamelCase       :  Dict=0.02      ,   __lowerCamelCase       :  List[Any]=0.001      ,   **__lowerCamelCase       :  Union[str, Any]      ,   )      ->  List[str]:
							super().__init__(**__lowerCamelCase							)

							if depth_multiplier <= 0:
										raise ValueError("depth_multiplier must be greater than zero."							)

							a					=    num_channels
							a					=    image_size
							a					=    depth_multiplier
							a					=    min_depth
							a					=    hidden_act
							a					=    tf_padding
							a					=    classifier_dropout_prob
							a					=    initializer_range
							a					=    layer_norm_eps




class 					snake_case__							(_UpperCamelCase     ):
				"""simple docstring"""



				SCREAMING_SNAKE_CASE_ :							Any											=      version.parse("""1.11"""     )





				@property
				def 							__UpperCAmelCase							(   self       :  Tuple							)      ->  Mapping[str, Mapping[int, str]]:
							return OrderedDict([("pixel_values", {0: "batch"})]							)





				@property
				def 							__UpperCAmelCase							(   self       :  str							)      ->  Mapping[str, Mapping[int, str]]:
							if self.task == "image-classification":
										return OrderedDict([("logits", {0: "batch"})]							)
							else:
										return OrderedDict([("last_hidden_state", {0: "batch"}), ("pooler_output", {0: "batch"})]							)





				@property
				def 							__UpperCAmelCase							(   self       :  Dict							)      ->  float:
							return 1e-4












from typing import TYPE_CHECKING

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


__lowerCAmelCase	:       Dict     =	{
    'configuration_blip': [
        'BLIP_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'BlipConfig',
        'BlipTextConfig',
        'BlipVisionConfig',
    ],
    'processing_blip': ['BlipProcessor'],
}

try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__lowerCAmelCase	:       Optional[Any]     =	['BlipImageProcessor']


try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__lowerCAmelCase	:       List[Any]     =	[
		    'BLIP_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'BlipModel',
		    'BlipPreTrainedModel',
		    'BlipForConditionalGeneration',
		    'BlipForQuestionAnswering',
		    'BlipVisionModel',
		    'BlipTextModel',
		    'BlipForImageTextRetrieval',
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__lowerCAmelCase	:       Any     =	[
		    'TF_BLIP_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'TFBlipModel',
		    'TFBlipPreTrainedModel',
		    'TFBlipForConditionalGeneration',
		    'TFBlipForQuestionAnswering',
		    'TFBlipVisionModel',
		    'TFBlipTextModel',
		    'TFBlipForImageTextRetrieval',
		]

if TYPE_CHECKING:
		from .configuration_blip import BLIP_PRETRAINED_CONFIG_ARCHIVE_MAP, BlipConfig, BlipTextConfig, BlipVisionConfig
		from .processing_blip import BlipProcessor

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .image_processing_blip import BlipImageProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_blip import (
				    BLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
				    BlipForConditionalGeneration,
				    BlipForImageTextRetrieval,
				    BlipForQuestionAnswering,
				    BlipModel,
				    BlipPreTrainedModel,
				    BlipTextModel,
				    BlipVisionModel,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_blip import (
				    TF_BLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFBlipForConditionalGeneration,
				    TFBlipForImageTextRetrieval,
				    TFBlipForQuestionAnswering,
				    TFBlipModel,
				    TFBlipPreTrainedModel,
				    TFBlipTextModel,
				    TFBlipVisionModel,
				)

else:
		import sys

		__lowerCAmelCase	:       List[str]     =	_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)






