



from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_torch_available,
    is_vision_available,
)


A__  :  str								=					{'''configuration_deit''': ['''DEIT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''DeiTConfig''', '''DeiTOnnxConfig''']}

try:
						if not is_vision_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A__  :  Dict								=					['''DeiTFeatureExtractor''']
						A__  :  int								=					['''DeiTImageProcessor''']

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A__  :  Optional[int]								=					[
						    '''DEIT_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''DeiTForImageClassification''',
						    '''DeiTForImageClassificationWithTeacher''',
						    '''DeiTForMaskedImageModeling''',
						    '''DeiTModel''',
						    '''DeiTPreTrainedModel''',
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A__  :  Any								=					[
						    '''TF_DEIT_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''TFDeiTForImageClassification''',
						    '''TFDeiTForImageClassificationWithTeacher''',
						    '''TFDeiTForMaskedImageModeling''',
						    '''TFDeiTModel''',
						    '''TFDeiTPreTrainedModel''',
						]


if TYPE_CHECKING:
						from .configuration_deit import DEIT_PRETRAINED_CONFIG_ARCHIVE_MAP, DeiTConfig, DeiTOnnxConfig

						try:
												if not is_vision_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .feature_extraction_deit import DeiTFeatureExtractor
												from .image_processing_deit import DeiTImageProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_deit import (
												    DEIT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    DeiTForImageClassification,
												    DeiTForImageClassificationWithTeacher,
												    DeiTForMaskedImageModeling,
												    DeiTModel,
												    DeiTPreTrainedModel,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_deit import (
												    TF_DEIT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFDeiTForImageClassification,
												    TFDeiTForImageClassificationWithTeacher,
												    TFDeiTForMaskedImageModeling,
												    TFDeiTModel,
												    TFDeiTPreTrainedModel,
												)


else:
						import sys

						A__  :  Any								=					_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)










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


A__  :  List[str]								=					logging.get_logger(__name__)

A__  :  int								=					{
    '''weiweishi/roc-bert-base-zh''': '''https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json''',
}



class 				__snake_case						(     UpperCamelCase_						):
							_a			      = '''roc_bert'''




							def __init__(       self     :       List[Any]				,				A_     :       Optional[Any]=3_0_5_2_2				,				A_     :       List[str]=7_6_8				,				A_     :       Tuple=1_2				,				A_     :       List[str]=1_2				,				A_     :       List[str]=3_0_7_2				,				A_     :       Any="gelu"				,				A_     :       str=0.1				,				A_     :       int=0.1				,				A_     :       Optional[int]=5_1_2				,				A_     :       int=2				,				A_     :       List[str]=0.02				,				A_     :       Union[str, Any]=1e-12				,				A_     :       Union[str, Any]=True				,				A_     :       Tuple=0				,				A_     :       Union[str, Any]="absolute"				,				A_     :       Optional[Any]=None				,				A_     :       Any=True				,				A_     :       Optional[int]=True				,				A_     :       List[Any]=7_6_8				,				A_     :       str=9_1_0				,				A_     :       Dict=5_1_2				,				A_     :       Optional[int]=2_4_8_5_8				,				A_     :       Optional[Any]=True				,				**A_     :       Dict				,				):
									lowerCAmelCase_			:     List[str]									= vocab_size
									lowerCAmelCase_			:     Any									= max_position_embeddings
									lowerCAmelCase_			:     Dict									= hidden_size
									lowerCAmelCase_			:     Union[str, Any]									= num_hidden_layers
									lowerCAmelCase_			:     Tuple									= num_attention_heads
									lowerCAmelCase_			:     int									= intermediate_size
									lowerCAmelCase_			:     Tuple									= hidden_act
									lowerCAmelCase_			:     List[str]									= hidden_dropout_prob
									lowerCAmelCase_			:     Tuple									= attention_probs_dropout_prob
									lowerCAmelCase_			:     Any									= initializer_range
									lowerCAmelCase_			:     Union[str, Any]									= type_vocab_size
									lowerCAmelCase_			:     Union[str, Any]									= layer_norm_eps
									lowerCAmelCase_			:     Optional[int]									= use_cache
									lowerCAmelCase_			:     Tuple									= enable_pronunciation
									lowerCAmelCase_			:     Optional[Any]									= enable_shape
									lowerCAmelCase_			:     Union[str, Any]									= pronunciation_embed_dim
									lowerCAmelCase_			:     List[Any]									= pronunciation_vocab_size
									lowerCAmelCase_			:     Tuple									= shape_embed_dim
									lowerCAmelCase_			:     str									= shape_vocab_size
									lowerCAmelCase_			:     Optional[int]									= concat_input
									lowerCAmelCase_			:     Optional[Any]									= position_embedding_type
									lowerCAmelCase_			:     Optional[Any]									= classifier_dropout
									super().__init__(pad_token_id=A_				,				**A_)





