






"""simple docstring"""



from typing import TYPE_CHECKING

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


__A		:       Dict  				=		{
    '''configuration_lxmert''': ['''LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''LxmertConfig'''],
    '''tokenization_lxmert''': ['''LxmertTokenizer'''],
}

try:
						if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__A		:       int  				=		['''LxmertTokenizerFast''']

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__A		:       Any  				=		[
						    '''LxmertEncoder''',
						    '''LxmertForPreTraining''',
						    '''LxmertForQuestionAnswering''',
						    '''LxmertModel''',
						    '''LxmertPreTrainedModel''',
						    '''LxmertVisualFeatureEncoder''',
						    '''LxmertXLayer''',
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__A		:       Any  				=		[
						    '''TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''TFLxmertForPreTraining''',
						    '''TFLxmertMainLayer''',
						    '''TFLxmertModel''',
						    '''TFLxmertPreTrainedModel''',
						    '''TFLxmertVisualFeatureEncoder''',
						]


if TYPE_CHECKING:
						from .configuration_lxmert import LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP, LxmertConfig
						from .tokenization_lxmert import LxmertTokenizer

						try:
												if not is_tokenizers_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_lxmert_fast import LxmertTokenizerFast

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_lxmert import (
												    LxmertEncoder,
												    LxmertForPreTraining,
												    LxmertForQuestionAnswering,
												    LxmertModel,
												    LxmertPreTrainedModel,
												    LxmertVisualFeatureEncoder,
												    LxmertXLayer,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_lxmert import (
												    TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFLxmertForPreTraining,
												    TFLxmertMainLayer,
												    TFLxmertModel,
												    TFLxmertPreTrainedModel,
												    TFLxmertVisualFeatureEncoder,
												)

else:
						import sys

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











"""simple docstring"""



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


__A		:       Dict  				=		logging.get_logger(__name__)

__A		:       Union[str, Any]  				=		{
    '''facebook/vit-mae-base''': '''https://huggingface.co/facebook/vit-mae-base/resolve/main/config.json''',
    # See all ViT MAE models at https://huggingface.co/models?filter=vit-mae
}





class 					_UpperCAmelCase       ( _A							):
					SCREAMING_SNAKE_CASE_		:				Union[str, Any]							    =   "vit_mae"




					def __init__(				self     :						Dict    ,						A     :						List[str]=7_68    ,						A     :						Any=12    ,						A     :						Union[str, Any]=12    ,						A     :						Tuple=30_72    ,						A     :						Any="gelu"    ,						A     :						Tuple=0.0    ,						A     :						List[str]=0.0    ,						A     :						Tuple=0.02    ,						A     :						Tuple=1e-12    ,						A     :						int=2_24    ,						A     :						Dict=16    ,						A     :						int=3    ,						A     :						Tuple=True    ,						A     :						Tuple=16    ,						A     :						Optional[Any]=5_12    ,						A     :						Union[str, Any]=8    ,						A     :						List[Any]=20_48    ,						A     :						Dict=0.75    ,						A     :						Any=False    ,						**A     :						Optional[int]    ,						)  ->  Union[str, Any]:
							super().__init__(**A   )

							lowercase_ : List[Any]							       =   hidden_size
							lowercase_ : str							       =   num_hidden_layers
							lowercase_ : List[Any]							       =   num_attention_heads
							lowercase_ : Any							       =   intermediate_size
							lowercase_ : Optional[int]							       =   hidden_act
							lowercase_ : List[Any]							       =   hidden_dropout_prob
							lowercase_ : int							       =   attention_probs_dropout_prob
							lowercase_ : int							       =   initializer_range
							lowercase_ : Dict							       =   layer_norm_eps
							lowercase_ : Optional[Any]							       =   image_size
							lowercase_ : str							       =   patch_size
							lowercase_ : Dict							       =   num_channels
							lowercase_ : Any							       =   qkv_bias
							lowercase_ : Union[str, Any]							       =   decoder_num_attention_heads
							lowercase_ : Optional[Any]							       =   decoder_hidden_size
							lowercase_ : List[str]							       =   decoder_num_hidden_layers
							lowercase_ : List[Any]							       =   decoder_intermediate_size
							lowercase_ : Optional[Any]							       =   mask_ratio
							lowercase_ : Optional[Any]							       =   norm_pix_loss



