

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


UpperCamelCase_    						=       logging.get_logger(__name__)

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





class 		__SCREAMING_SNAKE_CASE							(			lowercase__      ):
				lowerCamelCase_		       =    'data2vec-vision'







				def __init__(       self     :		Tuple		,					UpperCAmelCase__     :		List[Any]=768		,					UpperCAmelCase__     :		Optional[Any]=12		,					UpperCAmelCase__     :		Any=12		,					UpperCAmelCase__     :		str=3072		,					UpperCAmelCase__     :		Union[str, Any]="gelu"		,					UpperCAmelCase__     :		str=0.0		,					UpperCAmelCase__     :		int=0.0		,					UpperCAmelCase__     :		Optional[int]=0.02		,					UpperCAmelCase__     :		List[str]=1E-12		,					UpperCAmelCase__     :		Any=224		,					UpperCAmelCase__     :		Optional[int]=16		,					UpperCAmelCase__     :		Any=3		,					UpperCAmelCase__     :		List[Any]=False		,					UpperCAmelCase__     :		int=False		,					UpperCAmelCase__     :		Optional[Any]=False		,					UpperCAmelCase__     :		Dict=False		,					UpperCAmelCase__     :		Optional[Any]=0.1		,					UpperCAmelCase__     :		Optional[int]=0.1		,					UpperCAmelCase__     :		Any=True		,					UpperCAmelCase__     :		List[Any]=[3, 5, 7, 11]		,					UpperCAmelCase__     :		Optional[Any]=[1, 2, 3, 6]		,					UpperCAmelCase__     :		Optional[int]=True		,					UpperCAmelCase__     :		Union[str, Any]=0.4		,					UpperCAmelCase__     :		Dict=256		,					UpperCAmelCase__     :		List[str]=1		,					UpperCAmelCase__     :		str=False		,					UpperCAmelCase__     :		List[str]=255		,					**UpperCAmelCase__     :		Tuple		,					):
										'''simple docstring'''
										super().__init__(**UpperCAmelCase__   )

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

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





class 		__SCREAMING_SNAKE_CASE							(			lowercase__      ):
				lowerCamelCase_		       =    version.parse('1.11'      )







				@property
				def  lowerCamelCase_	(       self     :		Any   ):
										'''simple docstring'''
										return OrderedDict(
										    [
										        ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
										    ]   )







				@property
				def  lowerCamelCase_	(       self     :		Union[str, Any]   ):
										'''simple docstring'''
										return 1E-4










'''simple docstring'''





from ...configuration_utils import PretrainedConfig
from ...utils import logging


A__    :   Optional[Any]           =					logging.get_logger(__name__)

A__    :   List[str]           =					{
    '''microsoft/cvt-13''': '''https://huggingface.co/microsoft/cvt-13/resolve/main/config.json''',
    # See all Cvt models at https://huggingface.co/models?filter=cvt
}



class  snake_case__						(    SCREAMING_SNAKE_CASE_				):
 A__				= '''cvt'''
 def __init__(   self						:							Optional[Any]      ,     __a						:							Union[str, Any]=3      ,     __a						:							List[Any]=[7, 3, 3]      ,     __a						:							Optional[int]=[4, 2, 2]      ,     __a						:							Dict=[2, 1, 1]      ,     __a						:							Union[str, Any]=[64, 192, 384]      ,     __a						:							int=[1, 3, 6]      ,     __a						:							List[str]=[1, 2, 10]      ,     __a						:							Optional[Any]=[4.0, 4.0, 4.0]      ,     __a						:							Any=[0.0, 0.0, 0.0]      ,     __a						:							List[str]=[0.0, 0.0, 0.0]      ,     __a						:							List[Any]=[0.0, 0.0, 0.1]      ,     __a						:							List[str]=[True, True, True]      ,     __a						:							int=[False, False, True]      ,     __a						:							Dict=["dw_bn", "dw_bn", "dw_bn"]      ,     __a						:							List[str]=[3, 3, 3]      ,     __a						:							Union[str, Any]=[1, 1, 1]      ,     __a						:							Optional[int]=[2, 2, 2]      ,     __a						:							Optional[Any]=[1, 1, 1]      ,     __a						:							List[str]=[1, 1, 1]      ,     __a						:							List[str]=0.0_2      ,     __a						:							List[str]=1e-12      ,     **__a						:							List[str]      ,     )      ->   Dict:







       '''simple docstring'''
       super().__init__(**__a  )
       __snake_case :   int													=    num_channels
       __snake_case :   Union[str, Any]													=    patch_sizes
       __snake_case :   Any													=    patch_stride
       __snake_case :   List[str]													=    patch_padding
       __snake_case :   Optional[Any]													=    embed_dim
       __snake_case :   Union[str, Any]													=    num_heads
       __snake_case :   Dict													=    depth
       __snake_case :   Optional[Any]													=    mlp_ratio
       __snake_case :   List[str]													=    attention_drop_rate
       __snake_case :   Optional[int]													=    drop_rate
       __snake_case :   Optional[int]													=    drop_path_rate
       __snake_case :   Any													=    qkv_bias
       __snake_case :   int													=    cls_token
       __snake_case :   Optional[int]													=    qkv_projection_method
       __snake_case :   List[Any]													=    kernel_qkv
       __snake_case :   List[Any]													=    padding_kv
       __snake_case :   int													=    stride_kv
       __snake_case :   List[str]													=    padding_q
       __snake_case :   Dict													=    stride_q
       __snake_case :   Tuple													=    initializer_range
       __snake_case :   List[Any]													=    layer_norm_eps



