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

lowerCamelCase_    :		Union[str, Any]							=	{
    """google/efficientnet-b7""": """https://huggingface.co/google/efficientnet-b7/resolve/main/config.json""",
}


class 						a__							(       __snake_case		):
			A__    :       Tuple        =      'efficientnet'



			def __init__(						self				,						UpperCAmelCase = 3				,						UpperCAmelCase = 6_0_0				,						UpperCAmelCase = 2.0				,						UpperCAmelCase = 3.1				,						UpperCAmelCase = 8				,						UpperCAmelCase = [3, 3, 5, 3, 5, 5, 3]				,						UpperCAmelCase = [3_2, 1_6, 2_4, 4_0, 8_0, 1_1_2, 1_9_2]				,						UpperCAmelCase = [1_6, 2_4, 4_0, 8_0, 1_1_2, 1_9_2, 3_2_0]				,						UpperCAmelCase = []				,						UpperCAmelCase = [1, 2, 2, 2, 1, 2, 1]				,						UpperCAmelCase = [1, 2, 2, 3, 3, 4, 1]				,						UpperCAmelCase = [1, 6, 6, 6, 6, 6, 6]				,						UpperCAmelCase = 0.25				,						UpperCAmelCase = "swish"				,						UpperCAmelCase = 2_5_6_0				,						UpperCAmelCase = "mean"				,						UpperCAmelCase = 0.02				,						UpperCAmelCase = 0.001				,						UpperCAmelCase = 0.99				,						UpperCAmelCase = 0.5				,						UpperCAmelCase = 0.2				,						**UpperCAmelCase				,						)			->   int:
								super().__init__(**UpperCAmelCase   )

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






class 						a__							(       __snake_case		):
			A__    :       Optional[int]        =      version.parse('1.11'		)



			@property
			def __SCREAMING_SNAKE_CASE							(						self   )			->   Mapping[str, Mapping[int, str]]:
								return OrderedDict(
								    [
								        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
								    ]   )







			@property
			def __SCREAMING_SNAKE_CASE							(						self   )			->   float:
								return 1e-5





from typing import TYPE_CHECKING

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


lowerCamelCase_    :		Optional[int]							=	{"""configuration_xlnet""": ["""XLNET_PRETRAINED_CONFIG_ARCHIVE_MAP""", """XLNetConfig"""]}

try:
	if not is_sentencepiece_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowerCamelCase_    :		str							=	["""XLNetTokenizer"""]

try:
	if not is_tokenizers_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowerCamelCase_    :		Optional[Any]							=	["""XLNetTokenizerFast"""]

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowerCamelCase_    :		Union[str, Any]							=	[
	    """XLNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """XLNetForMultipleChoice""",
	    """XLNetForQuestionAnswering""",
	    """XLNetForQuestionAnsweringSimple""",
	    """XLNetForSequenceClassification""",
	    """XLNetForTokenClassification""",
	    """XLNetLMHeadModel""",
	    """XLNetModel""",
	    """XLNetPreTrainedModel""",
	    """load_tf_weights_in_xlnet""",
	]

try:
	if not is_tf_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowerCamelCase_    :		Optional[int]							=	[
	    """TF_XLNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """TFXLNetForMultipleChoice""",
	    """TFXLNetForQuestionAnsweringSimple""",
	    """TFXLNetForSequenceClassification""",
	    """TFXLNetForTokenClassification""",
	    """TFXLNetLMHeadModel""",
	    """TFXLNetMainLayer""",
	    """TFXLNetModel""",
	    """TFXLNetPreTrainedModel""",
	]


if TYPE_CHECKING:
	from .configuration_xlnet import XLNET_PRETRAINED_CONFIG_ARCHIVE_MAP, XLNetConfig

	try:
		if not is_sentencepiece_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .tokenization_xlnet import XLNetTokenizer

	try:
		if not is_tokenizers_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .tokenization_xlnet_fast import XLNetTokenizerFast

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_xlnet import (
		    XLNET_PRETRAINED_MODEL_ARCHIVE_LIST,
		    XLNetForMultipleChoice,
		    XLNetForQuestionAnswering,
		    XLNetForQuestionAnsweringSimple,
		    XLNetForSequenceClassification,
		    XLNetForTokenClassification,
		    XLNetLMHeadModel,
		    XLNetModel,
		    XLNetPreTrainedModel,
		    load_tf_weights_in_xlnet,
		)

	try:
		if not is_tf_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_tf_xlnet import (
		    TF_XLNET_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TFXLNetForMultipleChoice,
		    TFXLNetForQuestionAnsweringSimple,
		    TFXLNetForSequenceClassification,
		    TFXLNetForTokenClassification,
		    TFXLNetLMHeadModel,
		    TFXLNetMainLayer,
		    TFXLNetModel,
		    TFXLNetPreTrainedModel,
		)

else:
	import sys

	lowerCamelCase_    :		Tuple							=	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




