






"""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


lowerCamelCase_       			=   logging.get_logger(__name__)

lowerCamelCase_       			=   {
    '''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_ (__A  ):
	__magic_name__			   =       '''mobilenet_v2'''





	def __init__(   self      :				int			,			lowerCAmelCase_      :				Dict=3			,			lowerCAmelCase_      :				Any=224			,			lowerCAmelCase_      :				str=1.0			,			lowerCAmelCase_      :				List[Any]=8			,			lowerCAmelCase_      :				Optional[int]=8			,			lowerCAmelCase_      :				int=6			,			lowerCAmelCase_      :				Dict=32			,			lowerCAmelCase_      :				Dict=True			,			lowerCAmelCase_      :				List[Any]=True			,			lowerCAmelCase_      :				int="relu6"			,			lowerCAmelCase_      :				Union[str, Any]=True			,			lowerCAmelCase_      :				List[Any]=0.8			,			lowerCAmelCase_      :				List[str]=0.0_2			,			lowerCAmelCase_      :				int=0.0_0_1			,			lowerCAmelCase_      :				int=255			,			**lowerCAmelCase_      :				str			,			)		->    Optional[int]:
				super().__init__(**lowerCAmelCase_		)

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

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







class     UpperCamelCase_ (__A  ):
	__magic_name__			   =       version.parse('''1.11'''  )





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





	@property
	def   _SCREAMING_SNAKE_CASE   (   self      :				Tuple		)		->    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   _SCREAMING_SNAKE_CASE   (   self      :				Optional[Any]		)		->    float:
				return 1e-4











"""simple docstring"""
from typing import TYPE_CHECKING

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


lowerCamelCase_       			=   {
    '''configuration_funnel''': ['''FUNNEL_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''FunnelConfig'''],
    '''convert_funnel_original_tf_checkpoint_to_pytorch''': [],
    '''tokenization_funnel''': ['''FunnelTokenizer'''],
}

try:
			if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			lowerCamelCase_       			=   ['''FunnelTokenizerFast''']

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			lowerCamelCase_       			=   [
			    '''FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''FunnelBaseModel''',
			    '''FunnelForMaskedLM''',
			    '''FunnelForMultipleChoice''',
			    '''FunnelForPreTraining''',
			    '''FunnelForQuestionAnswering''',
			    '''FunnelForSequenceClassification''',
			    '''FunnelForTokenClassification''',
			    '''FunnelModel''',
			    '''FunnelPreTrainedModel''',
			    '''load_tf_weights_in_funnel''',
			]

try:
			if not is_tf_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			lowerCamelCase_       			=   [
			    '''TF_FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''TFFunnelBaseModel''',
			    '''TFFunnelForMaskedLM''',
			    '''TFFunnelForMultipleChoice''',
			    '''TFFunnelForPreTraining''',
			    '''TFFunnelForQuestionAnswering''',
			    '''TFFunnelForSequenceClassification''',
			    '''TFFunnelForTokenClassification''',
			    '''TFFunnelModel''',
			    '''TFFunnelPreTrainedModel''',
			]


if TYPE_CHECKING:
			from .configuration_funnel import FUNNEL_PRETRAINED_CONFIG_ARCHIVE_MAP, FunnelConfig
			from .tokenization_funnel import FunnelTokenizer

			try:
						if not is_tokenizers_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .tokenization_funnel_fast import FunnelTokenizerFast

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_funnel import (
						    FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST,
						    FunnelBaseModel,
						    FunnelForMaskedLM,
						    FunnelForMultipleChoice,
						    FunnelForPreTraining,
						    FunnelForQuestionAnswering,
						    FunnelForSequenceClassification,
						    FunnelForTokenClassification,
						    FunnelModel,
						    FunnelPreTrainedModel,
						    load_tf_weights_in_funnel,
						)

			try:
						if not is_tf_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_tf_funnel import (
						    TF_FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST,
						    TFFunnelBaseModel,
						    TFFunnelForMaskedLM,
						    TFFunnelForMultipleChoice,
						    TFFunnelForPreTraining,
						    TFFunnelForQuestionAnswering,
						    TFFunnelForSequenceClassification,
						    TFFunnelForTokenClassification,
						    TFFunnelModel,
						    TFFunnelPreTrainedModel,
						)

else:
			import sys

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



