
"""simple docstring"""




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


UpperCAmelCase__      :    Optional[int]    							= logging.get_logger(__name__)

UpperCAmelCase__      :    str    							= {
    '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 	lowerCAmelCase_						(a__  ):


				"""simple docstring"""



				__UpperCamelCase      :						Any					       =   '''visual_bert'''



				def __init__(self   ,       SCREAMING_SNAKE_CASE__=3_05_22   ,       SCREAMING_SNAKE_CASE__=7_68   ,       SCREAMING_SNAKE_CASE__=5_12   ,       SCREAMING_SNAKE_CASE__=12   ,       SCREAMING_SNAKE_CASE__=12   ,       SCREAMING_SNAKE_CASE__=30_72   ,       SCREAMING_SNAKE_CASE__="gelu"   ,       SCREAMING_SNAKE_CASE__=0.1   ,       SCREAMING_SNAKE_CASE__=0.1   ,       SCREAMING_SNAKE_CASE__=5_12   ,       SCREAMING_SNAKE_CASE__=2   ,       SCREAMING_SNAKE_CASE__=0.02   ,       SCREAMING_SNAKE_CASE__=1E-12   ,       SCREAMING_SNAKE_CASE__=False   ,       SCREAMING_SNAKE_CASE__=True   ,       SCREAMING_SNAKE_CASE__=1   ,       SCREAMING_SNAKE_CASE__=0   ,       SCREAMING_SNAKE_CASE__=2   ,       **SCREAMING_SNAKE_CASE__   ,       )					->		Tuple:



											"""simple docstring"""




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

											SCREAMING_SNAKE_CASE__						:       List[Any]           =   vocab_size
											SCREAMING_SNAKE_CASE__						:       List[str]           =   max_position_embeddings
											SCREAMING_SNAKE_CASE__						:       str           =   hidden_size
											SCREAMING_SNAKE_CASE__						:       Optional[Any]           =   visual_embedding_dim
											SCREAMING_SNAKE_CASE__						:       str           =   num_hidden_layers
											SCREAMING_SNAKE_CASE__						:       Union[str, Any]           =   num_attention_heads
											SCREAMING_SNAKE_CASE__						:       Optional[Any]           =   intermediate_size
											SCREAMING_SNAKE_CASE__						:       Union[str, Any]           =   hidden_act
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   hidden_dropout_prob
											SCREAMING_SNAKE_CASE__						:       int           =   attention_probs_dropout_prob
											SCREAMING_SNAKE_CASE__						:       str           =   initializer_range
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   type_vocab_size
											SCREAMING_SNAKE_CASE__						:       List[Any]           =   layer_norm_eps
											SCREAMING_SNAKE_CASE__						:       Optional[Any]           =   bypass_transformer
											SCREAMING_SNAKE_CASE__						:       List[str]           =   special_visual_initialize







"""simple docstring"""





from typing import TYPE_CHECKING

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


__UpperCamelCase  :      Optional[Any]							      =		{
    '''configuration_rag''': ['''RagConfig'''],
    '''retrieval_rag''': ['''RagRetriever'''],
    '''tokenization_rag''': ['''RagTokenizer'''],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__UpperCamelCase  :      Tuple							      =		[
							    '''RagModel''',
							    '''RagPreTrainedModel''',
							    '''RagSequenceForGeneration''',
							    '''RagTokenForGeneration''',
							]

try:
							if not is_tf_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__UpperCamelCase  :      Union[str, Any]							      =		[
							    '''TFRagModel''',
							    '''TFRagPreTrainedModel''',
							    '''TFRagSequenceForGeneration''',
							    '''TFRagTokenForGeneration''',
							]


if TYPE_CHECKING:
							from .configuration_rag import RagConfig
							from .retrieval_rag import RagRetriever
							from .tokenization_rag import RagTokenizer

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_rag import RagModel, RagPreTrainedModel, RagSequenceForGeneration, RagTokenForGeneration

							try:
														if not is_tf_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_tf_rag import (
														    TFRagModel,
														    TFRagPreTrainedModel,
														    TFRagSequenceForGeneration,
														    TFRagTokenForGeneration,
														)

else:
							import sys

							__UpperCamelCase  :      Dict							      =		_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




