


"""simple docstring"""







from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


lowerCAmelCase__      				=   {
    '''configuration_vision_encoder_decoder''': ['''VisionEncoderDecoderConfig''', '''VisionEncoderDecoderOnnxConfig''']
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     lowerCAmelCase__      				=   ['''VisionEncoderDecoderModel''']

try:
     if not is_tf_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     lowerCAmelCase__      				=   ['''TFVisionEncoderDecoderModel''']

try:
     if not is_flax_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     lowerCAmelCase__      				=   ['''FlaxVisionEncoderDecoderModel''']

if TYPE_CHECKING:
     from .configuration_vision_encoder_decoder import VisionEncoderDecoderConfig, VisionEncoderDecoderOnnxConfig

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_vision_encoder_decoder import VisionEncoderDecoderModel

     try:
          if not is_tf_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_tf_vision_encoder_decoder import TFVisionEncoderDecoderModel

     try:
          if not is_flax_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_flax_vision_encoder_decoder import FlaxVisionEncoderDecoderModel

else:
     import sys

     lowerCAmelCase__      				=   _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)









"""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__      				=   logging.get_logger(__name__)

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


class       SCREAMING_SNAKE_CASE__				(		lowercase				):
       """simple docstring"""


       a  :				List[Any]   ="data2vec-vision"

       def __init__(						self		,     snake_case__=768		,     snake_case__=12		,     snake_case__=12		,     snake_case__=3_072		,     snake_case__="gelu"		,     snake_case__=0.0		,     snake_case__=0.0		,     snake_case__=0.02		,     snake_case__=1e-12		,     snake_case__=224		,     snake_case__=16		,     snake_case__=3		,     snake_case__=False		,     snake_case__=False		,     snake_case__=False		,     snake_case__=False		,     snake_case__=0.1		,     snake_case__=0.1		,     snake_case__=True		,     snake_case__=[3, 5, 7, 11]		,     snake_case__=[1, 2, 3, 6]		,     snake_case__=True		,     snake_case__=0.4		,     snake_case__=256		,     snake_case__=1		,     snake_case__=False		,     snake_case__=255		,     **snake_case__		,     ):






         """simple docstring"""





         super().__init__(**snake_case__						)

         lowerCAmelCase     :     Tuple								=							hidden_size
         lowerCAmelCase     :     List[Any]								=							num_hidden_layers
         lowerCAmelCase     :     Tuple								=							num_attention_heads
         lowerCAmelCase     :     Optional[int]								=							intermediate_size
         lowerCAmelCase     :     Optional[int]								=							hidden_act
         lowerCAmelCase     :     Dict								=							hidden_dropout_prob
         lowerCAmelCase     :     Optional[Any]								=							attention_probs_dropout_prob
         lowerCAmelCase     :     int								=							initializer_range
         lowerCAmelCase     :     Dict								=							layer_norm_eps

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


class       SCREAMING_SNAKE_CASE__				(		lowercase				):
       """simple docstring"""


       a  :				Union[str, Any]   =version.parse("1.11"				)

       @property
       def        lowercase__							(						self						):






         """simple docstring"""





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







       @property
       def        lowercase__							(						self						):






         """simple docstring"""





         return 1e-4





