
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_    :			Dict    =	{
    """facebook/data2vec-vision-base-ft""": (
        """https://huggingface.co/facebook/data2vec-vision-base-ft/resolve/main/config.json"""
    ),
}

class 							_UpperCamelCase					(       _A	):






			'''simple docstring'''

			__UpperCamelCase   :    List[str]          =			"""data2vec-vision"""

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

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

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




class 							_UpperCamelCase					(       _A	):






			'''simple docstring'''

			__UpperCamelCase   :    Any          =			version.parse("""1.11"""	)

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




			@property
			def    lowerCAmelCase__						(							self			:							Optional[Any]   ):
							return 1e-4








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


lowerCamelCase_    :			Any    =	logging.get_logger(__name__)

lowerCamelCase_    :			Dict    =	{
    """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					(       _A	):






			'''simple docstring'''

			__UpperCamelCase   :    Any          =			"""dpr"""

			def __init__(							self			:							str    ,						snake_case_			:							Any=3_0522    ,						snake_case_			:							List[str]=768    ,						snake_case_			:							List[str]=12    ,						snake_case_			:							Union[str, Any]=12    ,						snake_case_			:							Tuple=3072    ,						snake_case_			:							Any="gelu"    ,						snake_case_			:							Optional[Any]=0.1    ,						snake_case_			:							str=0.1    ,						snake_case_			:							Dict=512    ,						snake_case_			:							int=2    ,						snake_case_			:							Union[str, Any]=0.02    ,						snake_case_			:							str=1e-12    ,						snake_case_			:							List[str]=0    ,						snake_case_			:							Any="absolute"    ,						snake_case_			:							int = 0    ,						**snake_case_			:							int    ,						):
							super().__init__(pad_token_id=snake_case_    ,						**snake_case_   )

							UpperCamelCase_:				str						=    vocab_size
							UpperCamelCase_:				Optional[int]						=    hidden_size
							UpperCamelCase_:				int						=    num_hidden_layers
							UpperCamelCase_:				Any						=    num_attention_heads
							UpperCamelCase_:				int						=    hidden_act
							UpperCamelCase_:				Optional[Any]						=    intermediate_size
							UpperCamelCase_:				Tuple						=    hidden_dropout_prob
							UpperCamelCase_:				Tuple						=    attention_probs_dropout_prob
							UpperCamelCase_:				str						=    max_position_embeddings
							UpperCamelCase_:				Any						=    type_vocab_size
							UpperCamelCase_:				Tuple						=    initializer_range
							UpperCamelCase_:				List[Any]						=    layer_norm_eps
							UpperCamelCase_:				Tuple						=    projection_dim
							UpperCamelCase_:				Dict						=    position_embedding_type






