




"""simple docstring"""

from typing import TYPE_CHECKING

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


__A							=     {
    "configuration_segformer": ["SEGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP", "SegformerConfig", "SegformerOnnxConfig"]
}

try:
							if not is_vision_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__A							=     ["SegformerFeatureExtractor"]
							__A							=     ["SegformerImageProcessor"]

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__A							=     [
							    "SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
							    "SegformerDecodeHead",
							    "SegformerForImageClassification",
							    "SegformerForSemanticSegmentation",
							    "SegformerLayer",
							    "SegformerModel",
							    "SegformerPreTrainedModel",
							]

try:
							if not is_tf_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__A							=     [
							    "TF_SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
							    "TFSegformerDecodeHead",
							    "TFSegformerForImageClassification",
							    "TFSegformerForSemanticSegmentation",
							    "TFSegformerModel",
							    "TFSegformerPreTrainedModel",
							]


if TYPE_CHECKING:
							from .configuration_segformer import SEGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, SegformerConfig, SegformerOnnxConfig

							try:
														if not is_vision_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .feature_extraction_segformer import SegformerFeatureExtractor
														from .image_processing_segformer import SegformerImageProcessor

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_segformer import (
														    SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
														    SegformerDecodeHead,
														    SegformerForImageClassification,
														    SegformerForSemanticSegmentation,
														    SegformerLayer,
														    SegformerModel,
														    SegformerPreTrainedModel,
														)
							try:
														if not is_tf_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_tf_segformer import (
														    TF_SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TFSegformerDecodeHead,
														    TFSegformerForImageClassification,
														    TFSegformerForSemanticSegmentation,
														    TFSegformerModel,
														    TFSegformerPreTrainedModel,
														)

else:
							import sys

							__A							=     _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)







"""simple docstring"""

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


__A							=     logging.get_logger(__name__)

__A							=     {
    "dandelin/vilt-b32-mlm": "https://huggingface.co/dandelin/vilt-b32-mlm/blob/main/config.json"
}
class      lowerCamelCase__      (					lowerCamelCase_     ):
			a__	: Optional[int]        =       """vilt"""


			def __init__(       self			,	SCREAMING_SNAKE_CASE=30_522			,	SCREAMING_SNAKE_CASE=2			,	SCREAMING_SNAKE_CASE=2			,	SCREAMING_SNAKE_CASE=40			,	SCREAMING_SNAKE_CASE=768			,	SCREAMING_SNAKE_CASE=12			,	SCREAMING_SNAKE_CASE=12			,	SCREAMING_SNAKE_CASE=3_072			,	SCREAMING_SNAKE_CASE="gelu"			,	SCREAMING_SNAKE_CASE=0.0			,	SCREAMING_SNAKE_CASE=0.0			,	SCREAMING_SNAKE_CASE=0.02			,	SCREAMING_SNAKE_CASE=1E-12			,	SCREAMING_SNAKE_CASE=384			,	SCREAMING_SNAKE_CASE=32			,	SCREAMING_SNAKE_CASE=3			,	SCREAMING_SNAKE_CASE=True			,	SCREAMING_SNAKE_CASE=-1			,	SCREAMING_SNAKE_CASE=False			,	SCREAMING_SNAKE_CASE=-1			,	**SCREAMING_SNAKE_CASE			,	):



					"""simple docstring"""







					super().__init__(tie_word_embeddings=SCREAMING_SNAKE_CASE			,	**SCREAMING_SNAKE_CASE							)

					snake_case						:  str        =			vocab_size
					snake_case						:  Optional[Any]        =			type_vocab_size
					snake_case						:  List[str]        =			modality_type_vocab_size
					snake_case						:  Optional[Any]        =			max_position_embeddings

					snake_case						:  Tuple        =			hidden_size
					snake_case						:  List[str]        =			num_hidden_layers
					snake_case						:  int        =			num_attention_heads
					snake_case						:  Optional[int]        =			intermediate_size
					snake_case						:  List[Any]        =			hidden_act
					snake_case						:  List[str]        =			hidden_dropout_prob
					snake_case						:  Union[str, Any]        =			attention_probs_dropout_prob
					snake_case						:  Any        =			initializer_range
					snake_case						:  List[Any]        =			layer_norm_eps

					snake_case						:  Any        =			image_size
					snake_case						:  str        =			patch_size
					snake_case						:  Optional[int]        =			num_channels
					snake_case						:  List[str]        =			qkv_bias
					snake_case						:  Optional[int]        =			max_image_length
					snake_case						:  Any        =			num_images

