


'''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


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

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


class 			__lowerCamelCase			(	a_	):
    """simple docstring"""
    a													=   "data2vec-vision"


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

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

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




class 			__lowerCamelCase			(	a_	):
    """simple docstring"""
    a													=   version.parse("1.11"	)


    @property
    def        A   (  self      :							List[str]):
           return OrderedDict(
               [
                   ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
               ])


    @property
    def        A   (  self      :							List[Any]):
           return 1e-4










'''simple docstring'''







from typing import TYPE_CHECKING

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


A				:					str    						=			{
    '''configuration_blip''': [
        '''BLIP_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''BlipConfig''',
        '''BlipTextConfig''',
        '''BlipVisionConfig''',
    ],
    '''processing_blip''': ['''BlipProcessor'''],
}

try:
   if not is_vision_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   A				:					Optional[Any]    						=			['''BlipImageProcessor''']


try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   A				:					List[Any]    						=			[
       '''BLIP_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''BlipModel''',
       '''BlipPreTrainedModel''',
       '''BlipForConditionalGeneration''',
       '''BlipForQuestionAnswering''',
       '''BlipVisionModel''',
       '''BlipTextModel''',
       '''BlipForImageTextRetrieval''',
   ]

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   A				:					Union[str, Any]    						=			[
       '''TF_BLIP_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''TFBlipModel''',
       '''TFBlipPreTrainedModel''',
       '''TFBlipForConditionalGeneration''',
       '''TFBlipForQuestionAnswering''',
       '''TFBlipVisionModel''',
       '''TFBlipTextModel''',
       '''TFBlipForImageTextRetrieval''',
   ]

if TYPE_CHECKING:
   from .configuration_blip import BLIP_PRETRAINED_CONFIG_ARCHIVE_MAP, BlipConfig, BlipTextConfig, BlipVisionConfig
   from .processing_blip import BlipProcessor

   try:
      if not is_vision_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .image_processing_blip import BlipImageProcessor

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_blip import (
          BLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
          BlipForConditionalGeneration,
          BlipForImageTextRetrieval,
          BlipForQuestionAnswering,
          BlipModel,
          BlipPreTrainedModel,
          BlipTextModel,
          BlipVisionModel,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_blip import (
          TF_BLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFBlipForConditionalGeneration,
          TFBlipForImageTextRetrieval,
          TFBlipForQuestionAnswering,
          TFBlipModel,
          TFBlipPreTrainedModel,
          TFBlipTextModel,
          TFBlipVisionModel,
      )

else:
   import sys

   A				:					Optional[int]    						=			_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)






