


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__			(			UpperCAmelCase__	):
			lowerCAmelCase :	List[Any]          =     "data2vec-vision"




			def __init__(		self  :     Any	,  lowerCamelCase__  :     List[str]=7_68	,  lowerCamelCase__  :     Optional[Any]=12	,  lowerCamelCase__  :     List[str]=12	,  lowerCamelCase__  :     Optional[Any]=30_72	,  lowerCamelCase__  :     Dict="gelu"	,  lowerCamelCase__  :     List[Any]=0.0	,  lowerCamelCase__  :     str=0.0	,  lowerCamelCase__  :     List[str]=0.0_2	,  lowerCamelCase__  :     Any=1E-12	,  lowerCamelCase__  :     Any=2_24	,  lowerCamelCase__  :     Dict=16	,  lowerCamelCase__  :     Optional[Any]=3	,  lowerCamelCase__  :     str=False	,  lowerCamelCase__  :     Optional[int]=False	,  lowerCamelCase__  :     Optional[Any]=False	,  lowerCamelCase__  :     int=False	,  lowerCamelCase__  :     List[Any]=0.1	,  lowerCamelCase__  :     Dict=0.1	,  lowerCamelCase__  :     str=True	,  lowerCamelCase__  :     int=[3, 5, 7, 11]	,  lowerCamelCase__  :     Optional[Any]=[1, 2, 3, 6]	,  lowerCamelCase__  :     List[Any]=True	,  lowerCamelCase__  :     Optional[Any]=0.4	,  lowerCamelCase__  :     Dict=2_56	,  lowerCamelCase__  :     Optional[int]=1	,  lowerCamelCase__  :     List[str]=False	,  lowerCamelCase__  :     Dict=2_55	,  **lowerCamelCase__  :     List[Any]	,  )   ->List[str]:



					'''simple docstring'''







					super().__init__(**lowerCamelCase__ )

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

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






class 	lowerCAmelCase__			(			UpperCAmelCase__	):
			lowerCAmelCase :	Any          =     version.parse("1.11"	)




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



					'''simple docstring'''







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






			@property
			def 							lowerCAmelCase__    (		self  :     Dict )   ->float:



					'''simple docstring'''







					return 1E-4







'''simple docstring'''


# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


lowerCamelCase__    	=     {'configuration_mra': ['MRA_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MraConfig']}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCamelCase__    	=     [
						    'MRA_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'MraForMaskedLM',
						    'MraForMultipleChoice',
						    'MraForQuestionAnswering',
						    'MraForSequenceClassification',
						    'MraForTokenClassification',
						    'MraLayer',
						    'MraModel',
						    'MraPreTrainedModel',
						]


if TYPE_CHECKING:
						from .configuration_mra import MRA_PRETRAINED_CONFIG_ARCHIVE_MAP, MraConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_mra import (
												    MRA_PRETRAINED_MODEL_ARCHIVE_LIST,
												    MraForMaskedLM,
												    MraForMultipleChoice,
												    MraForQuestionAnswering,
												    MraForSequenceClassification,
												    MraForTokenClassification,
												    MraLayer,
												    MraModel,
												    MraPreTrainedModel,
												)
else:
						import sys

						lowerCamelCase__    	=     _LazyModule(__name__, globals()['__file__'], _import_structure)



