




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


UpperCamelCase__            =     logging.get_logger(__name__)

UpperCamelCase__            =     {
    """apple/mobilevitv2-1.0""": """https://huggingface.co/apple/mobilevitv2-1.0/resolve/main/config.json""",
}
class      a__       (   snake_case__ ):
						_a				:       Optional[int]   =       """mobilevitv2"""






						def __init__(  self						,     _A=3						,     _A=2_5_6						,     _A=2						,     _A=2.0						,     _A="swish"						,     _A=3						,     _A=3_2						,     _A=0.1						,     _A=0.02						,     _A=1E-5						,     _A=5_1_2						,     _A=[6, 1_2, 1_8]						,     _A=0.1						,     _A=2_5_5						,     _A=[2, 4, 3]						,     _A=[1_2_8, 1_9_2, 2_5_6]						,     _A=1.0						,     _A=2						,     _A=0.0						,     _A=0.0						,     **_A						,     ):




											"""simple docstring"""



											super().__init__(**__lowercase     )

											__lowerCAmelCase							  =			num_channels
											__lowerCAmelCase							  =			image_size
											__lowerCAmelCase							  =			patch_size
											__lowerCAmelCase							  =			expand_ratio
											__lowerCAmelCase							  =			hidden_act
											__lowerCAmelCase							  =			conv_kernel_size
											__lowerCAmelCase							  =			output_stride
											__lowerCAmelCase							  =			initializer_range
											__lowerCAmelCase							  =			layer_norm_eps
											__lowerCAmelCase							  =			n_attn_blocks
											__lowerCAmelCase							  =			base_attn_unit_dims
											__lowerCAmelCase							  =			width_multiplier
											__lowerCAmelCase							  =			ffn_multiplier
											__lowerCAmelCase							  =			ffn_dropout
											__lowerCAmelCase							  =			attn_dropout
											__lowerCAmelCase							  =			classifier_dropout_prob

											# decode head attributes for semantic segmentation
											__lowerCAmelCase							  =			aspp_out_channels
											__lowerCAmelCase							  =			atrous_rates
											__lowerCAmelCase							  =			aspp_dropout_prob
											__lowerCAmelCase							  =			semantic_loss_ignore_index






class      a__       (   snake_case__ ):
						_a				:       List[Any]   =       version.parse("""1.11""" )






						@property
						def 							__SCREAMING_SNAKE_CASE(  self     ):




											"""simple docstring"""



											return OrderedDict([("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"})]     )






						@property
						def 							__SCREAMING_SNAKE_CASE(  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 							__SCREAMING_SNAKE_CASE(  self     ):




											"""simple docstring"""



											return 1E-4










from typing import TYPE_CHECKING

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


UpperCamelCase__						=		{
    'configuration_layoutlm': ['LAYOUTLM_PRETRAINED_CONFIG_ARCHIVE_MAP', 'LayoutLMConfig', 'LayoutLMOnnxConfig'],
    'tokenization_layoutlm': ['LayoutLMTokenizer'],
}

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

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							UpperCamelCase__						=		[
							    'LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'LayoutLMForMaskedLM',
							    'LayoutLMForSequenceClassification',
							    'LayoutLMForTokenClassification',
							    'LayoutLMForQuestionAnswering',
							    'LayoutLMModel',
							    'LayoutLMPreTrainedModel',
							]

try:
							if not is_tf_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							UpperCamelCase__						=		[
							    'TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'TFLayoutLMForMaskedLM',
							    'TFLayoutLMForSequenceClassification',
							    'TFLayoutLMForTokenClassification',
							    'TFLayoutLMForQuestionAnswering',
							    'TFLayoutLMMainLayer',
							    'TFLayoutLMModel',
							    'TFLayoutLMPreTrainedModel',
							]


if TYPE_CHECKING:
							from .configuration_layoutlm import LAYOUTLM_PRETRAINED_CONFIG_ARCHIVE_MAP, LayoutLMConfig, LayoutLMOnnxConfig
							from .tokenization_layoutlm import LayoutLMTokenizer

							try:
														if not is_tokenizers_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_layoutlm_fast import LayoutLMTokenizerFast

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_layoutlm import (
														    LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST,
														    LayoutLMForMaskedLM,
														    LayoutLMForQuestionAnswering,
														    LayoutLMForSequenceClassification,
														    LayoutLMForTokenClassification,
														    LayoutLMModel,
														    LayoutLMPreTrainedModel,
														)
							try:
														if not is_tf_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_tf_layoutlm import (
														    TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TFLayoutLMForMaskedLM,
														    TFLayoutLMForQuestionAnswering,
														    TFLayoutLMForSequenceClassification,
														    TFLayoutLMForTokenClassification,
														    TFLayoutLMMainLayer,
														    TFLayoutLMModel,
														    TFLayoutLMPreTrainedModel,
														)

else:
							import sys

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