




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        =    {
    "facebook/data2vec-vision-base-ft": (
        "https://huggingface.co/facebook/data2vec-vision-base-ft/resolve/main/config.json"
    ),
}







class     __lowerCAmelCase (       __magic_name__ ):

			"""simple docstring"""







			snake_case_   		=       '''data2vec-vision'''


			def __init__(      self			,						lowerCamelCase__=768			,						lowerCamelCase__=12			,						lowerCamelCase__=12			,						lowerCamelCase__=3_072			,						lowerCamelCase__="gelu"			,						lowerCamelCase__=0.0			,						lowerCamelCase__=0.0			,						lowerCamelCase__=0.02			,						lowerCamelCase__=1e-12			,						lowerCamelCase__=224			,						lowerCamelCase__=16			,						lowerCamelCase__=3			,						lowerCamelCase__=False			,						lowerCamelCase__=False			,						lowerCamelCase__=False			,						lowerCamelCase__=False			,						lowerCamelCase__=0.1			,						lowerCamelCase__=0.1			,						lowerCamelCase__=True			,						lowerCamelCase__=[3, 5, 7, 11]			,						lowerCamelCase__=[1, 2, 3, 6]			,						lowerCamelCase__=True			,						lowerCamelCase__=0.4			,						lowerCamelCase__=256			,						lowerCamelCase__=1			,						lowerCamelCase__=False			,						lowerCamelCase__=255			,						**lowerCamelCase__			,						)    ->      Optional[Any]:



							'''simple docstring'''
							super().__init__(**lowerCamelCase__							)

							__lowerCamelCase		       =    hidden_size
							__lowerCamelCase		       =    num_hidden_layers
							__lowerCamelCase		       =    num_attention_heads
							__lowerCamelCase		       =    intermediate_size
							__lowerCamelCase		       =    hidden_act
							__lowerCamelCase		       =    hidden_dropout_prob
							__lowerCamelCase		       =    attention_probs_dropout_prob
							__lowerCamelCase		       =    initializer_range
							__lowerCamelCase		       =    layer_norm_eps

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







class     __lowerCAmelCase (       __magic_name__ ):

			"""simple docstring"""







			snake_case_   		=       version.parse('''1.11''' )


			@property
			def       lowercase_    (      self							)    ->      Mapping[str, Mapping[int, str]]:



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






			@property
			def       lowercase_    (      self							)    ->      float:



							'''simple docstring'''
							return 1e-4








from typing import TYPE_CHECKING

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


snake_case_ : Dict    		=       {"configuration_mbart": ["MBART_PRETRAINED_CONFIG_ARCHIVE_MAP", "MBartConfig", "MBartOnnxConfig"]}

try:
    if not is_sentencepiece_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    snake_case_ : Tuple    		=       ["MBartTokenizer"]

try:
    if not is_tokenizers_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    snake_case_ : str    		=       ["MBartTokenizerFast"]

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    snake_case_ : List[Any]    		=       [
        "MBART_PRETRAINED_MODEL_ARCHIVE_LIST",
        "MBartForCausalLM",
        "MBartForConditionalGeneration",
        "MBartForQuestionAnswering",
        "MBartForSequenceClassification",
        "MBartModel",
        "MBartPreTrainedModel",
    ]

try:
    if not is_tf_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    snake_case_ : Any    		=       [
        "TFMBartForConditionalGeneration",
        "TFMBartModel",
        "TFMBartPreTrainedModel",
    ]

try:
    if not is_flax_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    snake_case_ : List[str]    		=       [
        "FlaxMBartForConditionalGeneration",
        "FlaxMBartForQuestionAnswering",
        "FlaxMBartForSequenceClassification",
        "FlaxMBartModel",
        "FlaxMBartPreTrainedModel",
    ]


if TYPE_CHECKING:
    from .configuration_mbart import MBART_PRETRAINED_CONFIG_ARCHIVE_MAP, MBartConfig, MBartOnnxConfig

    try:
        if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_mbart import MBartTokenizer

    try:
        if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_mbart_fast import MBartTokenizerFast

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_mbart import (
            MBART_PRETRAINED_MODEL_ARCHIVE_LIST,
            MBartForCausalLM,
            MBartForConditionalGeneration,
            MBartForQuestionAnswering,
            MBartForSequenceClassification,
            MBartModel,
            MBartPreTrainedModel,
        )

    try:
        if not is_tf_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_tf_mbart import TFMBartForConditionalGeneration, TFMBartModel, TFMBartPreTrainedModel

    try:
        if not is_flax_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_flax_mbart import (
            FlaxMBartForConditionalGeneration,
            FlaxMBartForQuestionAnswering,
            FlaxMBartForSequenceClassification,
            FlaxMBartModel,
            FlaxMBartPreTrainedModel,
        )

else:
    import sys

    snake_case_ : Any    		=       _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)






