

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


lowerCAmelCase				:    Dict        =		logging.get_logger(__name__)

lowerCAmelCase				:    Dict        =		{
    'unc-nlp/lxmert-base-uncased': 'https://huggingface.co/unc-nlp/lxmert-base-uncased/resolve/main/config.json',
}



class     __lowercase							(					__lowercase      ):




			"""simple docstring"""







			_UpperCAmelCase  :				Dict     				=	'''lxmert'''
			_UpperCAmelCase  :				List[str]     				=	{}



			def __init__(					self    :	Any  ,		lowerCAmelCase__    :	Any=3_0522  ,		lowerCAmelCase__    :	Dict=768  ,		lowerCAmelCase__    :	List[str]=12  ,		lowerCAmelCase__    :	Optional[Any]=9500  ,		lowerCAmelCase__    :	Optional[int]=1600  ,		lowerCAmelCase__    :	Any=400  ,		lowerCAmelCase__    :	str=3072  ,		lowerCAmelCase__    :	int="gelu"  ,		lowerCAmelCase__    :	List[str]=0.1  ,		lowerCAmelCase__    :	str=0.1  ,		lowerCAmelCase__    :	Any=512  ,		lowerCAmelCase__    :	List[str]=2  ,		lowerCAmelCase__    :	Union[str, Any]=0.02  ,		lowerCAmelCase__    :	Dict=1E-12  ,		lowerCAmelCase__    :	Optional[int]=9  ,		lowerCAmelCase__    :	List[Any]=5  ,		lowerCAmelCase__    :	Dict=5  ,		lowerCAmelCase__    :	Union[str, Any]=2048  ,		lowerCAmelCase__    :	List[Any]=4  ,		lowerCAmelCase__    :	Optional[Any]=6.67  ,		lowerCAmelCase__    :	Tuple=True  ,		lowerCAmelCase__    :	Union[str, Any]=True  ,		lowerCAmelCase__    :	Any=True  ,		lowerCAmelCase__    :	Tuple=True  ,		lowerCAmelCase__    :	Dict=True  ,		lowerCAmelCase__    :	Dict=True  ,		lowerCAmelCase__    :	Any=True  ,		**lowerCAmelCase__    :	List[str]  ,		):
									SCREAMING_SNAKE_CASE_:					int    						=			vocab_size
									SCREAMING_SNAKE_CASE_:					Union[str, Any]    						=			hidden_size
									SCREAMING_SNAKE_CASE_:					int    						=			num_attention_heads
									SCREAMING_SNAKE_CASE_:					List[str]    						=			hidden_act
									SCREAMING_SNAKE_CASE_:					List[str]    						=			intermediate_size
									SCREAMING_SNAKE_CASE_:					List[str]    						=			hidden_dropout_prob
									SCREAMING_SNAKE_CASE_:					Dict    						=			attention_probs_dropout_prob
									SCREAMING_SNAKE_CASE_:					Optional[int]    						=			max_position_embeddings
									SCREAMING_SNAKE_CASE_:					List[Any]    						=			type_vocab_size
									SCREAMING_SNAKE_CASE_:					Any    						=			initializer_range
									SCREAMING_SNAKE_CASE_:					Tuple    						=			layer_norm_eps
									SCREAMING_SNAKE_CASE_:					Optional[int]    						=			num_qa_labels
									SCREAMING_SNAKE_CASE_:					Any    						=			num_object_labels
									SCREAMING_SNAKE_CASE_:					Optional[int]    						=			num_attr_labels
									SCREAMING_SNAKE_CASE_:					str    						=			l_layers
									SCREAMING_SNAKE_CASE_:					Optional[int]    						=			x_layers
									SCREAMING_SNAKE_CASE_:					Tuple    						=			r_layers
									SCREAMING_SNAKE_CASE_:					str    						=			visual_feat_dim
									SCREAMING_SNAKE_CASE_:					List[str]    						=			visual_pos_dim
									SCREAMING_SNAKE_CASE_:					List[str]    						=			visual_loss_normalizer
									SCREAMING_SNAKE_CASE_:					Union[str, Any]    						=			task_matched
									SCREAMING_SNAKE_CASE_:					str    						=			task_mask_lm
									SCREAMING_SNAKE_CASE_:					Optional[Any]    						=			task_obj_predict
									SCREAMING_SNAKE_CASE_:					Optional[int]    						=			task_qa
									SCREAMING_SNAKE_CASE_:					int    						=			visual_obj_loss
									SCREAMING_SNAKE_CASE_:					List[str]    						=			visual_attr_loss
									SCREAMING_SNAKE_CASE_:					Tuple    						=			visual_feat_loss
									SCREAMING_SNAKE_CASE_:					str    						=			{"vision": r_layers, "cross_encoder": x_layers, "language": l_layers}
									super().__init__(**lowerCAmelCase__)








from typing import TYPE_CHECKING

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


lowercase    :   Optional[int]						=			{
    'configuration_mobilevit': ['MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MobileViTConfig', 'MobileViTOnnxConfig'],
}

try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowercase    :   List[str]						=			['MobileViTFeatureExtractor']
		lowercase    :   Tuple						=			['MobileViTImageProcessor']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowercase    :   List[Any]						=			[
		    'MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'MobileViTForImageClassification',
		    'MobileViTForSemanticSegmentation',
		    'MobileViTModel',
		    'MobileViTPreTrainedModel',
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowercase    :   List[Any]						=			[
		    'TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'TFMobileViTForImageClassification',
		    'TFMobileViTForSemanticSegmentation',
		    'TFMobileViTModel',
		    'TFMobileViTPreTrainedModel',
		]

if TYPE_CHECKING:
		from .configuration_mobilevit import MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, MobileViTConfig, MobileViTOnnxConfig

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .feature_extraction_mobilevit import MobileViTFeatureExtractor
				from .image_processing_mobilevit import MobileViTImageProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_mobilevit import (
				    MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    MobileViTForImageClassification,
				    MobileViTForSemanticSegmentation,
				    MobileViTModel,
				    MobileViTPreTrainedModel,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_mobilevit import (
				    TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFMobileViTForImageClassification,
				    TFMobileViTForSemanticSegmentation,
				    TFMobileViTModel,
				    TFMobileViTPreTrainedModel,
				)


else:
		import sys

		lowercase    :   Optional[int]						=			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)