


'''simple docstring'''



from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__lowercase			:		str =			logging.get_logger(__name__)

__lowercase			:		str =			{
    'nghuyong/ernie-1.0-base-zh': 'https://huggingface.co/nghuyong/ernie-1.0-base-zh/resolve/main/config.json',
    'nghuyong/ernie-2.0-base-en': 'https://huggingface.co/nghuyong/ernie-2.0-base-en/resolve/main/config.json',
    'nghuyong/ernie-2.0-large-en': 'https://huggingface.co/nghuyong/ernie-2.0-large-en/resolve/main/config.json',
    'nghuyong/ernie-3.0-base-zh': 'https://huggingface.co/nghuyong/ernie-3.0-base-zh/resolve/main/config.json',
    'nghuyong/ernie-3.0-medium-zh': 'https://huggingface.co/nghuyong/ernie-3.0-medium-zh/resolve/main/config.json',
    'nghuyong/ernie-3.0-mini-zh': 'https://huggingface.co/nghuyong/ernie-3.0-mini-zh/resolve/main/config.json',
    'nghuyong/ernie-3.0-micro-zh': 'https://huggingface.co/nghuyong/ernie-3.0-micro-zh/resolve/main/config.json',
    'nghuyong/ernie-3.0-nano-zh': 'https://huggingface.co/nghuyong/ernie-3.0-nano-zh/resolve/main/config.json',
    'nghuyong/ernie-gram-zh': 'https://huggingface.co/nghuyong/ernie-gram-zh/resolve/main/config.json',
    'nghuyong/ernie-health-zh': 'https://huggingface.co/nghuyong/ernie-health-zh/resolve/main/config.json',
}





class 							__UpperCamelCase       (	lowerCAmelCase_      ):
	A_			    =					"ernie"




	def __init__(     self		,       __a=3_0522		,       __a=768		,       __a=12		,       __a=12		,       __a=3072		,       __a="gelu"		,       __a=0.1		,       __a=0.1		,       __a=512		,       __a=2		,       __a=3		,       __a=False		,       __a=0.02		,       __a=1E-1_2		,       __a=0		,       __a="absolute"		,       __a=True		,       __a=None		,       **__a		,       ):

						'''simple docstring'''





						super().__init__(pad_token_id=__a		,       **__a							)

						__a    : Dict      					=						vocab_size
						__a    : int      					=						hidden_size
						__a    : int      					=						num_hidden_layers
						__a    : List[Any]      					=						num_attention_heads
						__a    : Optional[int]      					=						hidden_act
						__a    : Optional[Any]      					=						intermediate_size
						__a    : List[str]      					=						hidden_dropout_prob
						__a    : Union[str, Any]      					=						attention_probs_dropout_prob
						__a    : str      					=						max_position_embeddings
						__a    : Optional[Any]      					=						type_vocab_size
						__a    : Tuple      					=						task_type_vocab_size
						__a    : int      					=						use_task_id
						__a    : int      					=						initializer_range
						__a    : Optional[int]      					=						layer_norm_eps
						__a    : List[str]      					=						position_embedding_type
						__a    : List[str]      					=						use_cache
						__a    : str      					=						classifier_dropout





class 							__UpperCamelCase       (	lowerCAmelCase_      ):




	@property
	def    __UpperCAmelCase							(     self							):

						'''simple docstring'''





						if self.task == "multiple-choice":
											__a    : int      					=						{0: 'batch', 1: 'choice', 2: 'sequence'}
						else:
											__a    : Dict      					=						{0: 'batch', 1: 'sequence'}
						return OrderedDict(
						    [
						        ('input_ids', dynamic_axis),
						        ('attention_mask', dynamic_axis),
						        ('token_type_ids', dynamic_axis),
						        ('task_type_ids', dynamic_axis),
						    ]							)







'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__lowercase			:		Any =			{'configuration_visual_bert': ['VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'VisualBertConfig']}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__lowercase			:		Optional[int] =			[
	    'VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'VisualBertForMultipleChoice',
	    'VisualBertForPreTraining',
	    'VisualBertForQuestionAnswering',
	    'VisualBertForRegionToPhraseAlignment',
	    'VisualBertForVisualReasoning',
	    'VisualBertLayer',
	    'VisualBertModel',
	    'VisualBertPreTrainedModel',
	]


if TYPE_CHECKING:
	from .configuration_visual_bert import VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, VisualBertConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_visual_bert import (
		    VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    VisualBertForMultipleChoice,
		    VisualBertForPreTraining,
		    VisualBertForQuestionAnswering,
		    VisualBertForRegionToPhraseAlignment,
		    VisualBertForVisualReasoning,
		    VisualBertLayer,
		    VisualBertModel,
		    VisualBertPreTrainedModel,
		)


else:
	import sys

	__lowercase			:		Tuple =			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



