






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  :							Any			  =    logging.get_logger(__name__)

lowercase  :							List[Any]			  =    {
    """google/mobilenet_v2_1.4_224""": """https://huggingface.co/google/mobilenet_v2_1.4_224/resolve/main/config.json""",
    """google/mobilenet_v2_1.0_224""": """https://huggingface.co/google/mobilenet_v2_1.0_224/resolve/main/config.json""",
    """google/mobilenet_v2_0.75_160""": """https://huggingface.co/google/mobilenet_v2_0.75_160/resolve/main/config.json""",
    """google/mobilenet_v2_0.35_96""": """https://huggingface.co/google/mobilenet_v2_0.35_96/resolve/main/config.json""",
    # See all MobileNetV2 models at https://huggingface.co/models?filter=mobilenet_v2
}




class 		UpperCAmelCase_						(	snake_case_					):


						'''simple docstring'''




						A     :   int						=					"""mobilenet_v2"""






						def __init__(	self		,				_SCREAMING_SNAKE_CASE=3		,				_SCREAMING_SNAKE_CASE=224		,				_SCREAMING_SNAKE_CASE=1.0		,				_SCREAMING_SNAKE_CASE=8		,				_SCREAMING_SNAKE_CASE=8		,				_SCREAMING_SNAKE_CASE=6		,				_SCREAMING_SNAKE_CASE=32		,				_SCREAMING_SNAKE_CASE=True		,				_SCREAMING_SNAKE_CASE=True		,				_SCREAMING_SNAKE_CASE="relu6"		,				_SCREAMING_SNAKE_CASE=True		,				_SCREAMING_SNAKE_CASE=0.8		,				_SCREAMING_SNAKE_CASE=0.02		,				_SCREAMING_SNAKE_CASE=0.001		,				_SCREAMING_SNAKE_CASE=255		,				**_SCREAMING_SNAKE_CASE		,				) ->				Optional[int]:
								super().__init__(**_SCREAMING_SNAKE_CASE				)

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

								snake_case_				:							List[str]						 =       num_channels
								snake_case_				:							List[str]						 =       image_size
								snake_case_				:							Dict						 =       depth_multiplier
								snake_case_				:							str						 =       depth_divisible_by
								snake_case_				:							Optional[Any]						 =       min_depth
								snake_case_				:							Optional[Any]						 =       expand_ratio
								snake_case_				:							Tuple						 =       output_stride
								snake_case_				:							int						 =       first_layer_is_expansion
								snake_case_				:							List[str]						 =       finegrained_output
								snake_case_				:							Any						 =       hidden_act
								snake_case_				:							List[str]						 =       tf_padding
								snake_case_				:							List[Any]						 =       classifier_dropout_prob
								snake_case_				:							Optional[int]						 =       initializer_range
								snake_case_				:							str						 =       layer_norm_eps
								snake_case_				:							Optional[Any]						 =       semantic_loss_ignore_index




class 		UpperCAmelCase_						(	snake_case_					):


						'''simple docstring'''




						A     :   Union[str, Any]						=					version.parse('1.11'					)






						@property
						def       _lowerCAmelCase       (	self				) ->				List[Any]:
								return OrderedDict([("pixel_values", {0: "batch"})]				)






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






						@property
						def       _lowerCAmelCase       (	self				) ->				Tuple:
								return 1e-4








from typing import TYPE_CHECKING

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


lowercase  :							Union[str, Any]			  =    {'''configuration_xglm''': ['''XGLM_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''XGLMConfig''']}

try:
							if not is_sentencepiece_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowercase  :							Optional[int]			  =    ['''XGLMTokenizer''']

try:
							if not is_tokenizers_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowercase  :							Tuple			  =    ['''XGLMTokenizerFast''']

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowercase  :							str			  =    [
							    '''XGLM_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''XGLMForCausalLM''',
							    '''XGLMModel''',
							    '''XGLMPreTrainedModel''',
							]


try:
							if not is_flax_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowercase  :							str			  =    [
							    '''FlaxXGLMForCausalLM''',
							    '''FlaxXGLMModel''',
							    '''FlaxXGLMPreTrainedModel''',
							]


try:
							if not is_tf_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowercase  :							Tuple			  =    [
							    '''TF_XGLM_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''TFXGLMForCausalLM''',
							    '''TFXGLMModel''',
							    '''TFXGLMPreTrainedModel''',
							]


if TYPE_CHECKING:
							from .configuration_xglm import XGLM_PRETRAINED_CONFIG_ARCHIVE_MAP, XGLMConfig

							try:
														if not is_sentencepiece_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_xglm import XGLMTokenizer

							try:
														if not is_tokenizers_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_xglm_fast import XGLMTokenizerFast

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_xglm import XGLM_PRETRAINED_MODEL_ARCHIVE_LIST, XGLMForCausalLM, XGLMModel, XGLMPreTrainedModel

							try:
														if not is_flax_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_flax_xglm import FlaxXGLMForCausalLM, FlaxXGLMModel, FlaxXGLMPreTrainedModel

							try:
														if not is_tf_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_tf_xglm import (
														    TF_XGLM_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TFXGLMForCausalLM,
														    TFXGLMModel,
														    TFXGLMPreTrainedModel,
														)


else:
							import sys

							lowercase  :							Dict			  =    _LazyModule(__name__, globals()['''__file__'''], _import_structure)
