



'''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	:		Any				=   logging.get_logger(__name__)

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






class 					UpperCAmelCase__	(		UpperCamelCase__ ):
					a      :     Dict        =							"""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			,				)     ->			Any:
						super().__init__(**UpperCamelCase     )

						__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 					UpperCAmelCase__	(		UpperCamelCase__ ):
					a      :     str        =							version.parse("""1.11""" )



					@property
					def        UpperCAmelCase_ (    self     )     ->			Mapping[str, Mapping[int, str]]:
						return OrderedDict(
						    [
						        ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
						    ]     )



					@property
					def        UpperCAmelCase_ (    self     )     ->			float:
						return 1E-4




'''simple docstring'''



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


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

lowerCAmelCase	:		Optional[int]				=   {
    '''facebook/dpr-ctx_encoder-single-nq-base''': (
        '''https://huggingface.co/facebook/dpr-ctx_encoder-single-nq-base/resolve/main/config.json'''
    ),
    '''facebook/dpr-question_encoder-single-nq-base''': (
        '''https://huggingface.co/facebook/dpr-question_encoder-single-nq-base/resolve/main/config.json'''
    ),
    '''facebook/dpr-reader-single-nq-base''': (
        '''https://huggingface.co/facebook/dpr-reader-single-nq-base/resolve/main/config.json'''
    ),
    '''facebook/dpr-ctx_encoder-multiset-base''': (
        '''https://huggingface.co/facebook/dpr-ctx_encoder-multiset-base/resolve/main/config.json'''
    ),
    '''facebook/dpr-question_encoder-multiset-base''': (
        '''https://huggingface.co/facebook/dpr-question_encoder-multiset-base/resolve/main/config.json'''
    ),
    '''facebook/dpr-reader-multiset-base''': (
        '''https://huggingface.co/facebook/dpr-reader-multiset-base/resolve/main/config.json'''
    ),
}






class 					UpperCAmelCase__	(		UpperCamelCase__ ):
					a      :     Optional[Any]        =							"""dpr"""



					def __init__(    self			,				UpperCamelCase=3_0522			,				UpperCamelCase=768			,				UpperCamelCase=12			,				UpperCamelCase=12			,				UpperCamelCase=3072			,				UpperCamelCase="gelu"			,				UpperCamelCase=0.1			,				UpperCamelCase=0.1			,				UpperCamelCase=512			,				UpperCamelCase=2			,				UpperCamelCase=0.02			,				UpperCamelCase=1E-12			,				UpperCamelCase=0			,				UpperCamelCase="absolute"			,				UpperCamelCase = 0			,				**UpperCamelCase			,				)     ->			Tuple:
						super().__init__(pad_token_id=UpperCamelCase			,				**UpperCamelCase     )

						__lowerCAmelCase												=  vocab_size
						__lowerCAmelCase												=  hidden_size
						__lowerCAmelCase												=  num_hidden_layers
						__lowerCAmelCase												=  num_attention_heads
						__lowerCAmelCase												=  hidden_act
						__lowerCAmelCase												=  intermediate_size
						__lowerCAmelCase												=  hidden_dropout_prob
						__lowerCAmelCase												=  attention_probs_dropout_prob
						__lowerCAmelCase												=  max_position_embeddings
						__lowerCAmelCase												=  type_vocab_size
						__lowerCAmelCase												=  initializer_range
						__lowerCAmelCase												=  layer_norm_eps
						__lowerCAmelCase												=  projection_dim
						__lowerCAmelCase												=  position_embedding_type