
"""simple docstring"""


from typing import TYPE_CHECKING

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


_lowercase				 =					{
    '''configuration_convnext''': ['''CONVNEXT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ConvNextConfig''', '''ConvNextOnnxConfig''']
}

try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_lowercase				 =					['''ConvNextFeatureExtractor''']
		_lowercase				 =					['''ConvNextImageProcessor''']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_lowercase				 =					[
		    '''CONVNEXT_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''ConvNextForImageClassification''',
		    '''ConvNextModel''',
		    '''ConvNextPreTrainedModel''',
		    '''ConvNextBackbone''',
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_lowercase				 =					[
		    '''TFConvNextForImageClassification''',
		    '''TFConvNextModel''',
		    '''TFConvNextPreTrainedModel''',
		]

if TYPE_CHECKING:
		from .configuration_convnext import CONVNEXT_PRETRAINED_CONFIG_ARCHIVE_MAP, ConvNextConfig, ConvNextOnnxConfig

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .feature_extraction_convnext import ConvNextFeatureExtractor
				from .image_processing_convnext import ConvNextImageProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_convnext import (
				    CONVNEXT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    ConvNextBackbone,
				    ConvNextForImageClassification,
				    ConvNextModel,
				    ConvNextPreTrainedModel,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_convnext import TFConvNextForImageClassification, TFConvNextModel, TFConvNextPreTrainedModel


else:
		import sys

		_lowercase				 =					_LazyModule(__name__, globals()['''__file__'''], _import_structure)
'''simple docstring'''




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


__lowercase        =    logging.get_logger(__name__)

__lowercase        =    {
    '''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 							a__(   lowerCAmelCase__      ):


			'''simple docstring'''






			UpperCAmelCase_     :	List[str]						=			'''mobilenet_v1'''



			def __init__(  self			,       __lowerCAmelCase=3			,       __lowerCAmelCase=224			,       __lowerCAmelCase=1.0			,       __lowerCAmelCase=8			,       __lowerCAmelCase="relu6"			,       __lowerCAmelCase=True			,       __lowerCAmelCase=0.999			,       __lowerCAmelCase=0.02			,       __lowerCAmelCase=0.001			,       **__lowerCAmelCase			,       ):




					"""simple docstring"""


					super().__init__(**__lowerCAmelCase)

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

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







class 							a__(   lowerCAmelCase__      ):


			'''simple docstring'''






			UpperCAmelCase_     :	Dict						=			version.parse('''1.11'''      )



			@property
			def 				a_			(  self):




					"""simple docstring"""


					return OrderedDict([("""pixel_values""", {0: """batch"""})])



			@property
			def 				a_			(  self):




					"""simple docstring"""


					if self.task == "image-classification":
							return OrderedDict([("""logits""", {0: """batch"""})])
					else:
							return OrderedDict([("""last_hidden_state""", {0: """batch"""}), ("""pooler_output""", {0: """batch"""})])







			@property
			def 				a_			(  self):




					"""simple docstring"""


					return 1E-4




