"""simple docstring"""


import os
import sys

lowerCAmelCase_:					Any     =					os.path.join(os.path.dirname(__file__), "src")
sys.path.append(SRC_DIR)


from transformers import (
    AutoConfig,
    AutoModel,
    AutoModelForCausalLM,
    AutoModelForMaskedLM,
    AutoModelForQuestionAnswering,
    AutoModelForSequenceClassification,
    AutoTokenizer,
    add_start_docstrings,
)


lowerCAmelCase_:					Union[str, Any]     =					[
    "torch",
    "numpy",
    "tokenizers",
    "filelock",
    "requests",
    "tqdm",
    "regex",
    "sentencepiece",
    "sacremoses",
    "importlib_metadata",
    "huggingface_hub",
]







@add_start_docstrings(AutoConfig.__doc__      )
def 					__a   (		*A    ,				**A      ):






     '''simple docstring'''



     return AutoConfig.from_pretrained(*A    ,				**A      )







@add_start_docstrings(AutoTokenizer.__doc__      )
def 					__a   (		*A    ,				**A      ):






     '''simple docstring'''



     return AutoTokenizer.from_pretrained(*A    ,				**A      )







@add_start_docstrings(AutoModel.__doc__      )
def 					__a   (		*A    ,				**A      ):






     '''simple docstring'''



     return AutoModel.from_pretrained(*A    ,				**A      )







@add_start_docstrings(AutoModelForCausalLM.__doc__      )
def 					__a   (		*A    ,				**A      ):






     '''simple docstring'''



     return AutoModelForCausalLM.from_pretrained(*A    ,				**A      )







@add_start_docstrings(AutoModelForMaskedLM.__doc__      )
def 					__a   (		*A    ,				**A      ):






     '''simple docstring'''



     return AutoModelForMaskedLM.from_pretrained(*A    ,				**A      )







@add_start_docstrings(AutoModelForSequenceClassification.__doc__      )
def 					__a   (		*A    ,				**A      ):






     '''simple docstring'''



     return AutoModelForSequenceClassification.from_pretrained(*A    ,				**A      )







@add_start_docstrings(AutoModelForQuestionAnswering.__doc__      )
def 					__a   (		*A    ,				**A      ):






     '''simple docstring'''



     return AutoModelForQuestionAnswering.from_pretrained(*A    ,				**A      )





"""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


lowerCAmelCase_:					str     =					logging.get_logger(__name__)

lowerCAmelCase_:					List[Any]     =					{
    "facebook/data2vec-vision-base-ft": (
        "https://huggingface.co/facebook/data2vec-vision-base-ft/resolve/main/config.json"
    ),
}






class    a__    (   _a	):
   snake_case_							=      "data2vec-vision"


   def __init__(     self,				_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__(**_UpperCAmelCase  )

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

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






class    a__    (   _a	):
   snake_case_							=      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




