






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


_UpperCAmelCase			:		Any   				=    logging.get_logger(__name__)

_UpperCAmelCase			:		List[Any]   				=    {
    "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_       (				snake_case__					):
							UpperCamelCase_		:List[Any]		      =    'visual_bert'




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

											lowerCAmelCase__      			=						vocab_size
											lowerCAmelCase__      			=						max_position_embeddings
											lowerCAmelCase__      			=						hidden_size
											lowerCAmelCase__      			=						visual_embedding_dim
											lowerCAmelCase__      			=						num_hidden_layers
											lowerCAmelCase__      			=						num_attention_heads
											lowerCAmelCase__      			=						intermediate_size
											lowerCAmelCase__      			=						hidden_act
											lowerCAmelCase__      			=						hidden_dropout_prob
											lowerCAmelCase__      			=						attention_probs_dropout_prob
											lowerCAmelCase__      			=						initializer_range
											lowerCAmelCase__      			=						type_vocab_size
											lowerCAmelCase__      			=						layer_norm_eps
											lowerCAmelCase__      			=						bypass_transformer
											lowerCAmelCase__      			=						special_visual_initialize













from typing import TYPE_CHECKING

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


_UpperCAmelCase			:		Optional[Any]   				=    {
    "configuration_ernie": ["ERNIE_PRETRAINED_CONFIG_ARCHIVE_MAP", "ErnieConfig", "ErnieOnnxConfig"],
}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_UpperCAmelCase			:		Any   				=    [
			    "ERNIE_PRETRAINED_MODEL_ARCHIVE_LIST",
			    "ErnieForCausalLM",
			    "ErnieForMaskedLM",
			    "ErnieForMultipleChoice",
			    "ErnieForNextSentencePrediction",
			    "ErnieForPreTraining",
			    "ErnieForQuestionAnswering",
			    "ErnieForSequenceClassification",
			    "ErnieForTokenClassification",
			    "ErnieModel",
			    "ErniePreTrainedModel",
			]

if TYPE_CHECKING:
			from .configuration_ernie import ERNIE_PRETRAINED_CONFIG_ARCHIVE_MAP, ErnieConfig, ErnieOnnxConfig

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_ernie import (
						    ERNIE_PRETRAINED_MODEL_ARCHIVE_LIST,
						    ErnieForCausalLM,
						    ErnieForMaskedLM,
						    ErnieForMultipleChoice,
						    ErnieForNextSentencePrediction,
						    ErnieForPreTraining,
						    ErnieForQuestionAnswering,
						    ErnieForSequenceClassification,
						    ErnieForTokenClassification,
						    ErnieModel,
						    ErniePreTrainedModel,
						)

else:
			import sys

			_UpperCAmelCase			:		Dict   				=    _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





