






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__							=     logging.get_logger(__name__)

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




class 			snake_case__   (							__UpperCAmelCase):

       '''simple docstring'''
       lowerCamelCase							:				Optional[int] 				= """data2vec-vision"""



       def __init__(							self			,						a__=7_68			,						a__=12			,						a__=12			,						a__=30_72			,						a__="gelu"			,						a__=0.0			,						a__=0.0			,						a__=0.02			,						a__=1e-12			,						a__=2_24			,						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__=2_56			,						a__=1			,						a__=False			,						a__=2_55			,						**a__			,						) ->      Union[str, Any]:






            '''simple docstring'''





            super().__init__(**UpperCAmelCase_    )

            __snake_case			:Union[str, Any]          =						hidden_size
            __snake_case			:List[Any]          =						num_hidden_layers
            __snake_case			:str          =						num_attention_heads
            __snake_case			:int          =						intermediate_size
            __snake_case			:List[str]          =						hidden_act
            __snake_case			:Optional[Any]          =						hidden_dropout_prob
            __snake_case			:Tuple          =						attention_probs_dropout_prob
            __snake_case			:int          =						initializer_range
            __snake_case			:List[str]          =						layer_norm_eps

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




class 			snake_case__   (							__UpperCAmelCase):

       '''simple docstring'''
       lowerCamelCase							:				Optional[Any] 				= version.parse("1.11")



       @property
       def 					__lowercase						(							self    ) ->      Optional[Any]:






            '''simple docstring'''





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



       @property
       def 					__lowercase						(							self    ) ->      Optional[int]:






            '''simple docstring'''





            return 1e-4










def   UpperCamelCase  (       snake_case__     :   str  ):




     '''simple docstring'''






     __snake_case			:List[Any]          =						hex_num.strip()
     if not hex_num:
          raise ValueError("""No value was passed to the function"""  )

     __snake_case			:str          =						hex_num[0] == """-"""
     if is_negative:
          __snake_case			:List[Any]          =						hex_num[1:]

     try:
          __snake_case			:Tuple          =						int(snake_case__	,16  )
     except ValueError:
          raise ValueError("""Invalid value was passed to the function"""  )

     __snake_case			:int          =						""""""
     while int_num > 0:
          __snake_case			:Optional[int]          =						str(int_num % 2  ) + bin_str
          int_num >>= 1

     return int(("""-""" + bin_str) if is_negative else bin_str  )


if __name__ == "__main__":
     import doctest

     doctest.testmod()


