






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


_a      	=  logging.get_logger(__name__)

_a      	=  {
    '''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 __lowerCamelCase (      __lowercase):





	"""simple docstring"""






	UpperCamelCase__								=      "beit"

	def __init__(							self       ,    UpperCAmelCase=8192       ,    UpperCAmelCase=768       ,    UpperCAmelCase=12       ,    UpperCAmelCase=12       ,    UpperCAmelCase=3072       ,    UpperCAmelCase="gelu"       ,    UpperCAmelCase=0.0       ,    UpperCAmelCase=0.0       ,    UpperCAmelCase=0.02       ,    UpperCAmelCase=1e-12       ,    UpperCAmelCase=224       ,    UpperCAmelCase=16       ,    UpperCAmelCase=3       ,    UpperCAmelCase=False       ,    UpperCAmelCase=False       ,    UpperCAmelCase=False       ,    UpperCAmelCase=False       ,    UpperCAmelCase=0.1       ,    UpperCAmelCase=0.1       ,    UpperCAmelCase=True       ,    UpperCAmelCase=[3, 5, 7, 11]       ,    UpperCAmelCase=[1, 2, 3, 6]       ,    UpperCAmelCase=True       ,    UpperCAmelCase=0.4       ,    UpperCAmelCase=256       ,    UpperCAmelCase=1       ,    UpperCAmelCase=False       ,    UpperCAmelCase=255       ,    **UpperCAmelCase       ,    ):
							"""simple docstring"""







							super().__init__(**_a    )

							_UpperCAmelCase									=			vocab_size
							_UpperCAmelCase									=			hidden_size
							_UpperCAmelCase									=			num_hidden_layers
							_UpperCAmelCase									=			num_attention_heads
							_UpperCAmelCase									=			intermediate_size
							_UpperCAmelCase									=			hidden_act
							_UpperCAmelCase									=			hidden_dropout_prob
							_UpperCAmelCase									=			attention_probs_dropout_prob
							_UpperCAmelCase									=			initializer_range
							_UpperCAmelCase									=			layer_norm_eps

							_UpperCAmelCase									=			image_size
							_UpperCAmelCase									=			patch_size
							_UpperCAmelCase									=			num_channels
							_UpperCAmelCase									=			use_mask_token
							_UpperCAmelCase									=			use_absolute_position_embeddings
							_UpperCAmelCase									=			use_relative_position_bias
							_UpperCAmelCase									=			use_shared_relative_position_bias
							_UpperCAmelCase									=			layer_scale_init_value
							_UpperCAmelCase									=			drop_path_rate
							_UpperCAmelCase									=			use_mean_pooling
							# decode head attributes (semantic segmentation)
							_UpperCAmelCase									=			out_indices
							_UpperCAmelCase									=			pool_scales
							# auxiliary head attributes (semantic segmentation)
							_UpperCAmelCase									=			use_auxiliary_head
							_UpperCAmelCase									=			auxiliary_loss_weight
							_UpperCAmelCase									=			auxiliary_channels
							_UpperCAmelCase									=			auxiliary_num_convs
							_UpperCAmelCase									=			auxiliary_concat_input
							_UpperCAmelCase									=			semantic_loss_ignore_index





class __lowerCamelCase (      __lowercase):





	"""simple docstring"""






	UpperCamelCase__								=      version.parse("1.11")

	@property
	def        UpperCamelCase    (							self    ):
							"""simple docstring"""







							return OrderedDict(
							    [
							        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
							    ]    )

	@property
	def        UpperCamelCase    (							self    ):
							"""simple docstring"""







							return 1e-4



from typing import TYPE_CHECKING

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


a__				=		{'''configuration_mmbt''': ['''MMBTConfig''']}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			a__				=		['''MMBTForClassification''', '''MMBTModel''', '''ModalEmbeddings''']


if TYPE_CHECKING:
			from .configuration_mmbt import MMBTConfig

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_mmbt import MMBTForClassification, MMBTModel, ModalEmbeddings

else:
			import sys

			a__				=		_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



