



from typing import TYPE_CHECKING

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


_snake_case	=						{
    "configuration_distilbert": [
        "DISTILBERT_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "DistilBertConfig",
        "DistilBertOnnxConfig",
    ],
    "tokenization_distilbert": ["DistilBertTokenizer"],
}

try:
						if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_snake_case	=						["DistilBertTokenizerFast"]

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_snake_case	=						[
						    "DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "DistilBertForMaskedLM",
						    "DistilBertForMultipleChoice",
						    "DistilBertForQuestionAnswering",
						    "DistilBertForSequenceClassification",
						    "DistilBertForTokenClassification",
						    "DistilBertModel",
						    "DistilBertPreTrainedModel",
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_snake_case	=						[
						    "TF_DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "TFDistilBertForMaskedLM",
						    "TFDistilBertForMultipleChoice",
						    "TFDistilBertForQuestionAnswering",
						    "TFDistilBertForSequenceClassification",
						    "TFDistilBertForTokenClassification",
						    "TFDistilBertMainLayer",
						    "TFDistilBertModel",
						    "TFDistilBertPreTrainedModel",
						]

try:
						if not is_flax_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_snake_case	=						[
						    "FlaxDistilBertForMaskedLM",
						    "FlaxDistilBertForMultipleChoice",
						    "FlaxDistilBertForQuestionAnswering",
						    "FlaxDistilBertForSequenceClassification",
						    "FlaxDistilBertForTokenClassification",
						    "FlaxDistilBertModel",
						    "FlaxDistilBertPreTrainedModel",
						]


if TYPE_CHECKING:
						from .configuration_distilbert import (
						    DISTILBERT_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    DistilBertConfig,
						    DistilBertOnnxConfig,
						)
						from .tokenization_distilbert import DistilBertTokenizer

						try:
												if not is_tokenizers_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_distilbert_fast import DistilBertTokenizerFast

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_distilbert import (
												    DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    DistilBertForMaskedLM,
												    DistilBertForMultipleChoice,
												    DistilBertForQuestionAnswering,
												    DistilBertForSequenceClassification,
												    DistilBertForTokenClassification,
												    DistilBertModel,
												    DistilBertPreTrainedModel,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_distilbert import (
												    TF_DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFDistilBertForMaskedLM,
												    TFDistilBertForMultipleChoice,
												    TFDistilBertForQuestionAnswering,
												    TFDistilBertForSequenceClassification,
												    TFDistilBertForTokenClassification,
												    TFDistilBertMainLayer,
												    TFDistilBertModel,
												    TFDistilBertPreTrainedModel,
												)

						try:
												if not is_flax_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_flax_distilbert import (
												    FlaxDistilBertForMaskedLM,
												    FlaxDistilBertForMultipleChoice,
												    FlaxDistilBertForQuestionAnswering,
												    FlaxDistilBertForSequenceClassification,
												    FlaxDistilBertForTokenClassification,
												    FlaxDistilBertModel,
												    FlaxDistilBertPreTrainedModel,
												)

else:
						import sys

						_snake_case	=						_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




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


_snake_case	=						logging.get_logger(__name__)

_snake_case	=						{
    "facebook/data2vec-vision-base-ft": (
        "https://huggingface.co/facebook/data2vec-vision-base-ft/resolve/main/config.json"
    ),
}



class 						UpperCAmelCase_					( a):
							lowerCamelCase__         =	'data2vec-vision'







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

														'''simple docstring'''

														super().__init__(**__a)

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

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



class 						UpperCAmelCase_					( a):
							lowerCamelCase__         =	version.parse('1.11')







							@property
							def      snake_case__   (     self):

														'''simple docstring'''

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







							@property
							def      snake_case__   (     self):

														'''simple docstring'''

														return 1E-4
