




"""simple docstring"""


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


A_      =    logging.get_logger(__name__)

A_      =    {
    '''uclanlp/visualbert-vqa''': '''https://huggingface.co/uclanlp/visualbert-vqa/resolve/main/config.json''',
    '''uclanlp/visualbert-vqa-pre''': '''https://huggingface.co/uclanlp/visualbert-vqa-pre/resolve/main/config.json''',
    '''uclanlp/visualbert-vqa-coco-pre''': (
        '''https://huggingface.co/uclanlp/visualbert-vqa-coco-pre/resolve/main/config.json'''
    ),
    '''uclanlp/visualbert-vcr''': '''https://huggingface.co/uclanlp/visualbert-vcr/resolve/main/config.json''',
    '''uclanlp/visualbert-vcr-pre''': '''https://huggingface.co/uclanlp/visualbert-vcr-pre/resolve/main/config.json''',
    '''uclanlp/visualbert-vcr-coco-pre''': (
        '''https://huggingface.co/uclanlp/visualbert-vcr-coco-pre/resolve/main/config.json'''
    ),
    '''uclanlp/visualbert-nlvr2''': '''https://huggingface.co/uclanlp/visualbert-nlvr2/resolve/main/config.json''',
    '''uclanlp/visualbert-nlvr2-pre''': '''https://huggingface.co/uclanlp/visualbert-nlvr2-pre/resolve/main/config.json''',
    '''uclanlp/visualbert-nlvr2-coco-pre''': (
        '''https://huggingface.co/uclanlp/visualbert-nlvr2-coco-pre/resolve/main/config.json'''
    )
    # See all VisualBERT models at https://huggingface.co/models?filter=visual_bert
}






class  lowercase(					__a			):







 '''simple docstring'''





 lowercase__			 = "visual_bert"


 def __init__(    self:		Any,				a_:		Tuple=30_522,				a_:		Dict=768,				a_:		Optional[Any]=512,				a_:		Optional[Any]=12,				a_:		str=12,				a_:		Union[str, Any]=3_072,				a_:		int="gelu",				a_:		Dict=0.1,				a_:		Optional[int]=0.1,				a_:		str=512,				a_:		int=2,				a_:		List[Any]=0.02,				a_:		Tuple=1E-12,				a_:		Any=False,				a_:		Dict=True,				a_:		List[Any]=1,				a_:		str=0,				a_:		Dict=2,				**a_:		Dict,				):




   '''simple docstring'''



   super().__init__(pad_token_id=__UpperCAmelCase,				bos_token_id=__UpperCAmelCase,				eos_token_id=__UpperCAmelCase,				**__UpperCAmelCase		)

   _snake_case							:		List[Any]								=  vocab_size
   _snake_case							:		Tuple								=  max_position_embeddings
   _snake_case							:		int								=  hidden_size
   _snake_case							:		Tuple								=  visual_embedding_dim
   _snake_case							:		Tuple								=  num_hidden_layers
   _snake_case							:		List[str]								=  num_attention_heads
   _snake_case							:		Tuple								=  intermediate_size
   _snake_case							:		Dict								=  hidden_act
   _snake_case							:		int								=  hidden_dropout_prob
   _snake_case							:		List[str]								=  attention_probs_dropout_prob
   _snake_case							:		Dict								=  initializer_range
   _snake_case							:		List[Any]								=  type_vocab_size
   _snake_case							:		List[str]								=  layer_norm_eps
   _snake_case							:		Tuple								=  bypass_transformer
   _snake_case							:		List[Any]								=  special_visual_initialize







"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


A_      =    {
    '''configuration_maskformer''': ['''MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''MaskFormerConfig'''],
    '''configuration_maskformer_swin''': ['''MaskFormerSwinConfig'''],
}

try:
     if not is_vision_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     A_      =    ['''MaskFormerFeatureExtractor''']
     A_      =    ['''MaskFormerImageProcessor''']


try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     A_      =    [
         '''MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
         '''MaskFormerForInstanceSegmentation''',
         '''MaskFormerModel''',
         '''MaskFormerPreTrainedModel''',
     ]
     A_      =    [
         '''MaskFormerSwinBackbone''',
         '''MaskFormerSwinModel''',
         '''MaskFormerSwinPreTrainedModel''',
     ]

if TYPE_CHECKING:
     from .configuration_maskformer import MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, MaskFormerConfig
     from .configuration_maskformer_swin import MaskFormerSwinConfig

     try:
          if not is_vision_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .feature_extraction_maskformer import MaskFormerFeatureExtractor
          from .image_processing_maskformer import MaskFormerImageProcessor
     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_maskformer import (
              MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
              MaskFormerForInstanceSegmentation,
              MaskFormerModel,
              MaskFormerPreTrainedModel,
          )
          from .modeling_maskformer_swin import (
              MaskFormerSwinBackbone,
              MaskFormerSwinModel,
              MaskFormerSwinPreTrainedModel,
          )


else:
     import sys

     A_      =    _LazyModule(__name__, globals()['''__file__'''], _import_structure)


