

'''simple docstring'''





from collections import OrderedDict
from typing import Mapping

from packaging import version

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


UpperCamelCase_    						=       logging.get_logger(__name__)

UpperCamelCase_    						=       {
    """microsoft/beit-base-patch16-224-pt22k""": (
        """https://huggingface.co/microsoft/beit-base-patch16-224-pt22k/resolve/main/config.json"""
    ),
    # See all BEiT models at https://huggingface.co/models?filter=beit
}





class 		__SCREAMING_SNAKE_CASE							(			lowercase__      ):
				lowerCamelCase_		       =    'beit'







				def __init__(       self     :		Union[str, Any]		,					UpperCAmelCase__     :		Any=8192		,					UpperCAmelCase__     :		Optional[int]=768		,					UpperCAmelCase__     :		Union[str, Any]=12		,					UpperCAmelCase__     :		Optional[Any]=12		,					UpperCAmelCase__     :		str=3072		,					UpperCAmelCase__     :		Dict="gelu"		,					UpperCAmelCase__     :		Dict=0.0		,					UpperCAmelCase__     :		Optional[Any]=0.0		,					UpperCAmelCase__     :		int=0.02		,					UpperCAmelCase__     :		str=1E-12		,					UpperCAmelCase__     :		str=224		,					UpperCAmelCase__     :		Optional[Any]=16		,					UpperCAmelCase__     :		int=3		,					UpperCAmelCase__     :		Dict=False		,					UpperCAmelCase__     :		List[str]=False		,					UpperCAmelCase__     :		int=False		,					UpperCAmelCase__     :		int=False		,					UpperCAmelCase__     :		Dict=0.1		,					UpperCAmelCase__     :		Optional[Any]=0.1		,					UpperCAmelCase__     :		Any=True		,					UpperCAmelCase__     :		List[Any]=[3, 5, 7, 11]		,					UpperCAmelCase__     :		List[str]=[1, 2, 3, 6]		,					UpperCAmelCase__     :		Dict=True		,					UpperCAmelCase__     :		Union[str, Any]=0.4		,					UpperCAmelCase__     :		List[Any]=256		,					UpperCAmelCase__     :		List[Any]=1		,					UpperCAmelCase__     :		Union[str, Any]=False		,					UpperCAmelCase__     :		Optional[int]=255		,					**UpperCAmelCase__     :		Tuple		,					):
										'''simple docstring'''
										super().__init__(**UpperCAmelCase__   )

										lowercase :							List[str]    		=vocab_size
										lowercase :							str    		=hidden_size
										lowercase :							Any    		=num_hidden_layers
										lowercase :							List[str]    		=num_attention_heads
										lowercase :							List[Any]    		=intermediate_size
										lowercase :							Optional[int]    		=hidden_act
										lowercase :							Optional[int]    		=hidden_dropout_prob
										lowercase :							Any    		=attention_probs_dropout_prob
										lowercase :							List[str]    		=initializer_range
										lowercase :							int    		=layer_norm_eps

										lowercase :							str    		=image_size
										lowercase :							Union[str, Any]    		=patch_size
										lowercase :							Tuple    		=num_channels
										lowercase :							List[Any]    		=use_mask_token
										lowercase :							Optional[int]    		=use_absolute_position_embeddings
										lowercase :							Any    		=use_relative_position_bias
										lowercase :							int    		=use_shared_relative_position_bias
										lowercase :							str    		=layer_scale_init_value
										lowercase :							int    		=drop_path_rate
										lowercase :							Optional[int]    		=use_mean_pooling
										# decode head attributes (semantic segmentation)
										lowercase :							Dict    		=out_indices
										lowercase :							int    		=pool_scales
										# auxiliary head attributes (semantic segmentation)
										lowercase :							Optional[Any]    		=use_auxiliary_head
										lowercase :							Optional[int]    		=auxiliary_loss_weight
										lowercase :							Optional[int]    		=auxiliary_channels
										lowercase :							Any    		=auxiliary_num_convs
										lowercase :							Tuple    		=auxiliary_concat_input
										lowercase :							List[Any]    		=semantic_loss_ignore_index





class 		__SCREAMING_SNAKE_CASE							(			lowercase__      ):
				lowerCamelCase_		       =    version.parse('1.11'      )







				@property
				def  lowerCamelCase_	(       self     :		List[str]   ):
										'''simple docstring'''
										return OrderedDict(
										    [
										        ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
										    ]   )







				@property
				def  lowerCamelCase_	(       self     :		Optional[int]   ):
										'''simple docstring'''
										return 1E-4










"""simple docstring"""

from typing import TYPE_CHECKING

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


A_						:    str				=      {'configuration_unispeech': ['UNISPEECH_PRETRAINED_CONFIG_ARCHIVE_MAP', 'UniSpeechConfig']}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							A_						:    Optional[int]				=      [
							    'UNISPEECH_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'UniSpeechForCTC',
							    'UniSpeechForPreTraining',
							    'UniSpeechForSequenceClassification',
							    'UniSpeechModel',
							    'UniSpeechPreTrainedModel',
							]

if TYPE_CHECKING:
							from .configuration_unispeech import UNISPEECH_PRETRAINED_CONFIG_ARCHIVE_MAP, UniSpeechConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_unispeech import (
														    UNISPEECH_PRETRAINED_MODEL_ARCHIVE_LIST,
														    UniSpeechForCTC,
														    UniSpeechForPreTraining,
														    UniSpeechForSequenceClassification,
														    UniSpeechModel,
														    UniSpeechPreTrainedModel,
														)

else:
							import sys

							A_						:    int				=      _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)





