


"""simple docstring"""







from typing import TYPE_CHECKING

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


a__    :							Tuple            =					{
    '''configuration_layoutlmv3''': [
        '''LAYOUTLMV3_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''LayoutLMv3Config''',
        '''LayoutLMv3OnnxConfig''',
    ],
    '''processing_layoutlmv3''': ['''LayoutLMv3Processor'''],
    '''tokenization_layoutlmv3''': ['''LayoutLMv3Tokenizer'''],
}

try:
		if not is_tokenizers_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		a__    :							Optional[Any]            =					['''LayoutLMv3TokenizerFast''']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		a__    :							int            =					[
		    '''LAYOUTLMV3_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''LayoutLMv3ForQuestionAnswering''',
		    '''LayoutLMv3ForSequenceClassification''',
		    '''LayoutLMv3ForTokenClassification''',
		    '''LayoutLMv3Model''',
		    '''LayoutLMv3PreTrainedModel''',
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		a__    :							Optional[int]            =					[
		    '''TF_LAYOUTLMV3_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''TFLayoutLMv3ForQuestionAnswering''',
		    '''TFLayoutLMv3ForSequenceClassification''',
		    '''TFLayoutLMv3ForTokenClassification''',
		    '''TFLayoutLMv3Model''',
		    '''TFLayoutLMv3PreTrainedModel''',
		]

try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		a__    :							List[str]            =					['''LayoutLMv3FeatureExtractor''']
		a__    :							int            =					['''LayoutLMv3ImageProcessor''']


if TYPE_CHECKING:
		from .configuration_layoutlmva import (
		    LAYOUTLMV3_PRETRAINED_CONFIG_ARCHIVE_MAP,
		    LayoutLMvaConfig,
		    LayoutLMvaOnnxConfig,
		)
		from .processing_layoutlmva import LayoutLMvaProcessor
		from .tokenization_layoutlmva import LayoutLMvaTokenizer

		try:
				if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .tokenization_layoutlmva_fast import LayoutLMvaTokenizerFast

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_layoutlmva import (
				    LAYOUTLMV3_PRETRAINED_MODEL_ARCHIVE_LIST,
				    LayoutLMvaForQuestionAnswering,
				    LayoutLMvaForSequenceClassification,
				    LayoutLMvaForTokenClassification,
				    LayoutLMvaModel,
				    LayoutLMvaPreTrainedModel,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_layoutlmva import (
				    TF_LAYOUTLMV3_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFLayoutLMvaForQuestionAnswering,
				    TFLayoutLMvaForSequenceClassification,
				    TFLayoutLMvaForTokenClassification,
				    TFLayoutLMvaModel,
				    TFLayoutLMvaPreTrainedModel,
				)

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .feature_extraction_layoutlmva import LayoutLMvaFeatureExtractor
				from .image_processing_layoutlmva import LayoutLMvaImageProcessor

else:
		import sys

		a__    :							List[Any]            =					_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




"""simple docstring"""







from typing import List

from ...configuration_utils import PretrainedConfig
from ...utils import logging


a__    :							Tuple            =					logging.get_logger(__name__)

a__    :							List[Any]            =					{
    '''snap-research/efficientformer-l1-300''': (
        '''https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json'''
    ),
}




class 			UpperCamelCase_     (			UpperCamelCase):

	"""simple docstring"""





	snake_case__    :  Any    =      "efficientformer"




	def __init__(			self      :    Any      ,      UpperCAmelCase__      :    List[int] = [3, 2, 6, 4]      ,      UpperCAmelCase__      :    List[int] = [4_8, 9_6, 2_2_4, 4_4_8]      ,      UpperCAmelCase__      :    List[bool] = [True, True, True, True]      ,      UpperCAmelCase__      :    int = 4_4_8      ,      UpperCAmelCase__      :    int = 3_2      ,      UpperCAmelCase__      :    int = 4      ,      UpperCAmelCase__      :    int = 7      ,      UpperCAmelCase__      :    int = 5      ,      UpperCAmelCase__      :    int = 8      ,      UpperCAmelCase__      :    int = 4      ,      UpperCAmelCase__      :    float = 0.0      ,      UpperCAmelCase__      :    int = 1_6      ,      UpperCAmelCase__      :    int = 3      ,      UpperCAmelCase__      :    int = 3      ,      UpperCAmelCase__      :    int = 3      ,      UpperCAmelCase__      :    int = 2      ,      UpperCAmelCase__      :    int = 1      ,      UpperCAmelCase__      :    float = 0.0      ,      UpperCAmelCase__      :    int = 1      ,      UpperCAmelCase__      :    bool = True      ,      UpperCAmelCase__      :    bool = True      ,      UpperCAmelCase__      :    float = 1E-5      ,      UpperCAmelCase__      :    str = "gelu"      ,      UpperCAmelCase__      :    float = 0.02      ,      UpperCAmelCase__      :    float = 1E-12      ,      UpperCAmelCase__      :    int = 2_2_4      ,      UpperCAmelCase__      :    float = 1E-05      ,      **UpperCAmelCase__      :    Tuple      ,      )	->     None:
						super().__init__(**UpperCAmelCase__       )

						__SCREAMING_SNAKE_CASE						       =    hidden_act
						__SCREAMING_SNAKE_CASE						       =    hidden_dropout_prob
						__SCREAMING_SNAKE_CASE						       =    hidden_sizes
						__SCREAMING_SNAKE_CASE						       =    num_hidden_layers
						__SCREAMING_SNAKE_CASE						       =    num_attention_heads
						__SCREAMING_SNAKE_CASE						       =    initializer_range
						__SCREAMING_SNAKE_CASE						       =    layer_norm_eps
						__SCREAMING_SNAKE_CASE						       =    patch_size
						__SCREAMING_SNAKE_CASE						       =    num_channels
						__SCREAMING_SNAKE_CASE						       =    depths
						__SCREAMING_SNAKE_CASE						       =    mlp_expansion_ratio
						__SCREAMING_SNAKE_CASE						       =    downsamples
						__SCREAMING_SNAKE_CASE						       =    dim
						__SCREAMING_SNAKE_CASE						       =    key_dim
						__SCREAMING_SNAKE_CASE						       =    attention_ratio
						__SCREAMING_SNAKE_CASE						       =    resolution
						__SCREAMING_SNAKE_CASE						       =    pool_size
						__SCREAMING_SNAKE_CASE						       =    downsample_patch_size
						__SCREAMING_SNAKE_CASE						       =    downsample_stride
						__SCREAMING_SNAKE_CASE						       =    downsample_pad
						__SCREAMING_SNAKE_CASE						       =    drop_path_rate
						__SCREAMING_SNAKE_CASE						       =    num_metaad_blocks
						__SCREAMING_SNAKE_CASE						       =    distillation
						__SCREAMING_SNAKE_CASE						       =    use_layer_scale
						__SCREAMING_SNAKE_CASE						       =    layer_scale_init_value
						__SCREAMING_SNAKE_CASE						       =    image_size
						__SCREAMING_SNAKE_CASE						       =    batch_norm_eps
