





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

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







class 		UpperCAmelCase   (				_UpperCAmelCase):


		"""simple docstring"""







		lowerCAmelCase_					=				"""data2vec-vision"""


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

				_UpperCamelCase       			=hidden_size
				_UpperCamelCase       			=num_hidden_layers
				_UpperCamelCase       			=num_attention_heads
				_UpperCamelCase       			=intermediate_size
				_UpperCamelCase       			=hidden_act
				_UpperCamelCase       			=hidden_dropout_prob
				_UpperCamelCase       			=attention_probs_dropout_prob
				_UpperCamelCase       			=initializer_range
				_UpperCamelCase       			=layer_norm_eps

				_UpperCamelCase       			=image_size
				_UpperCamelCase       			=patch_size
				_UpperCamelCase       			=num_channels
				_UpperCamelCase       			=use_mask_token
				_UpperCamelCase       			=use_absolute_position_embeddings
				_UpperCamelCase       			=use_relative_position_bias
				_UpperCamelCase       			=use_shared_relative_position_bias
				_UpperCamelCase       			=layer_scale_init_value
				_UpperCamelCase       			=drop_path_rate
				_UpperCamelCase       			=use_mean_pooling
				# decode head attributes (semantic segmentation)
				_UpperCamelCase       			=out_indices
				_UpperCamelCase       			=pool_scales
				# auxiliary head attributes (semantic segmentation)
				_UpperCamelCase       			=use_auxiliary_head
				_UpperCamelCase       			=auxiliary_loss_weight
				_UpperCamelCase       			=auxiliary_channels
				_UpperCamelCase       			=auxiliary_num_convs
				_UpperCamelCase       			=auxiliary_concat_input
				_UpperCamelCase       			=semantic_loss_ignore_index







class 		UpperCAmelCase   (				_UpperCAmelCase):


		"""simple docstring"""







		lowerCAmelCase_					=				version.parse("""1.11""")


		@property
		def   UpperCamelCase__      (				self    :					List[Any]  )     ->						Dict:
				return OrderedDict(
				    [
				        ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
				    ]  )




		@property
		def   UpperCamelCase__      (				self    :					List[Any]  )     ->						int:
				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

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__lowerCamelCase						: Optional[int]		=   {
    'configuration_xmod': [
        'XMOD_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'XmodConfig',
        'XmodOnnxConfig',
    ],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __lowerCamelCase						: int		=   [
          'XMOD_PRETRAINED_MODEL_ARCHIVE_LIST',
          'XmodForCausalLM',
          'XmodForMaskedLM',
          'XmodForMultipleChoice',
          'XmodForQuestionAnswering',
          'XmodForSequenceClassification',
          'XmodForTokenClassification',
          'XmodModel',
          'XmodPreTrainedModel',
      ]

if TYPE_CHECKING:
      from .configuration_xmod import XMOD_PRETRAINED_CONFIG_ARCHIVE_MAP, XmodConfig, XmodOnnxConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_xmod import (
                XMOD_PRETRAINED_MODEL_ARCHIVE_LIST,
                XmodForCausalLM,
                XmodForMaskedLM,
                XmodForMultipleChoice,
                XmodForQuestionAnswering,
                XmodForSequenceClassification,
                XmodForTokenClassification,
                XmodModel,
                XmodPreTrainedModel,
            )

else:
      import sys

      __lowerCamelCase						: Dict		=   _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)






