





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  __lowerCAmelCase	(      _a					):
			lowerCamelCase_					:					str	      =				'''data2vec-vision'''






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


							'''simple docstring'''



							super().__init__(**__magic_name__   )

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

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




class  __lowerCAmelCase	(      _a					):
			lowerCamelCase_					:					List[str]	      =				version.parse('''1.11'''					)






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


							'''simple docstring'''



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






			@property
			def       lowerCamelCase  (self   )					->       float:


							'''simple docstring'''



							return 1e-4







def 					lowerCamelCase_						(    _UpperCamelCase			)		->						str:






				"""simple docstring"""


				if number > 0:
								raise ValueError('''input must be a negative integer'''			)
				snake_case_						:   List[str]           =  len(bin(_UpperCamelCase			)[3:]			)
				snake_case_						:   str           =  bin(abs(_UpperCamelCase			) - (1 << binary_number_length)			)[3:]
				snake_case_						:   Dict           =  (
				    (
				        '''1'''
				        + '''0''' * (binary_number_length - len(_UpperCamelCase			))
				        + twos_complement_number
				    )
				    if number < 0
				    else '''0'''
				)
				return "0b" + twos_complement_number


if __name__ == "__main__":
	import doctest

	doctest.testmod()
