



import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
   import ctypes
   import msvcrt  # noqa


   class   snake_case_ (ctypes.Structure  ):




          """simple docstring"""






          _lowerCamelCase			    =				[('''size''', ctypes.c_int), ('''visible''', ctypes.c_byte)]







def    _snake_case (       )     ->     Optional[Any]:






      '''simple docstring'''







      if os.name == "nt":
            UpperCAmelCase_  :	List[Any]				      =		CursorInfo()
            UpperCAmelCase_  :	str				      =		ctypes.windll.kernelaa.GetStdHandle(-1_1    )
            ctypes.windll.kernelaa.GetConsoleCursorInfo(lowerCAmelCase_					,  ctypes.byref(lowerCAmelCase_    )    )
            UpperCAmelCase_  :	Union[str, Any]				      =		False
            ctypes.windll.kernelaa.SetConsoleCursorInfo(lowerCAmelCase_					,  ctypes.byref(lowerCAmelCase_    )    )
      elif os.name == "posix":
            sys.stdout.write("\033[?25l"    )
            sys.stdout.flush()







def    _snake_case (       )     ->     List[Any]:






      '''simple docstring'''







      if os.name == "nt":
            UpperCAmelCase_  :	str				      =		CursorInfo()
            UpperCAmelCase_  :	Union[str, Any]				      =		ctypes.windll.kernelaa.GetStdHandle(-1_1    )
            ctypes.windll.kernelaa.GetConsoleCursorInfo(lowerCAmelCase_					,  ctypes.byref(lowerCAmelCase_    )    )
            UpperCAmelCase_  :	Dict				      =		True
            ctypes.windll.kernelaa.SetConsoleCursorInfo(lowerCAmelCase_					,  ctypes.byref(lowerCAmelCase_    )    )
      elif os.name == "posix":
            sys.stdout.write("\033[?25h"    )
            sys.stdout.flush()







@contextmanager
def    _snake_case (       )     ->     List[Any]:






      '''simple docstring'''







      try:
            hide_cursor()
            yield
      finally:
            show_cursor()





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


__lowerCamelCase         =			logging.get_logger(__name__)

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


class   snake_case_ (lowercase__  ):




       """simple docstring"""






       _lowerCamelCase			    =				"""lxmert"""
       _lowerCamelCase			    =				{}



       def __init__(     self     ,lowercase=30522     ,lowercase=768     ,lowercase=12     ,lowercase=9500     ,lowercase=1600     ,lowercase=400     ,lowercase=3072     ,lowercase="gelu"     ,lowercase=0.1     ,lowercase=0.1     ,lowercase=512     ,lowercase=2     ,lowercase=0.02     ,lowercase=1E-12     ,lowercase=9     ,lowercase=5     ,lowercase=5     ,lowercase=2048     ,lowercase=4     ,lowercase=6.67     ,lowercase=True     ,lowercase=True     ,lowercase=True     ,lowercase=True     ,lowercase=True     ,lowercase=True     ,lowercase=True     ,**lowercase     ,):

             """simple docstring"""





             UpperCAmelCase_  :	List[str]				      =		vocab_size
             UpperCAmelCase_  :	str				      =		hidden_size
             UpperCAmelCase_  :	List[str]				      =		num_attention_heads
             UpperCAmelCase_  :	Dict				      =		hidden_act
             UpperCAmelCase_  :	List[Any]				      =		intermediate_size
             UpperCAmelCase_  :	Tuple				      =		hidden_dropout_prob
             UpperCAmelCase_  :	List[Any]				      =		attention_probs_dropout_prob
             UpperCAmelCase_  :	Any				      =		max_position_embeddings
             UpperCAmelCase_  :	str				      =		type_vocab_size
             UpperCAmelCase_  :	Any				      =		initializer_range
             UpperCAmelCase_  :	Optional[Any]				      =		layer_norm_eps
             UpperCAmelCase_  :	Any				      =		num_qa_labels
             UpperCAmelCase_  :	str				      =		num_object_labels
             UpperCAmelCase_  :	Dict				      =		num_attr_labels
             UpperCAmelCase_  :	Tuple				      =		l_layers
             UpperCAmelCase_  :	Tuple				      =		x_layers
             UpperCAmelCase_  :	int				      =		r_layers
             UpperCAmelCase_  :	Optional[Any]				      =		visual_feat_dim
             UpperCAmelCase_  :	List[Any]				      =		visual_pos_dim
             UpperCAmelCase_  :	int				      =		visual_loss_normalizer
             UpperCAmelCase_  :	str				      =		task_matched
             UpperCAmelCase_  :	str				      =		task_mask_lm
             UpperCAmelCase_  :	int				      =		task_obj_predict
             UpperCAmelCase_  :	List[str]				      =		task_qa
             UpperCAmelCase_  :	Optional[int]				      =		visual_obj_loss
             UpperCAmelCase_  :	List[str]				      =		visual_attr_loss
             UpperCAmelCase_  :	str				      =		visual_feat_loss
             UpperCAmelCase_  :	List[Any]				      =		{"vision": r_layers, "cross_encoder": x_layers, "language": l_layers}
             super().__init__(**lowercase)
