



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


SCREAMING_SNAKE_CASE__          =  logging.get_logger(__name__)

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


class 					snake_case			(UpperCamelCase ):
       lowerCAmelCase__	:List[Any]     =       "data2vec-vision"



       def __init__(					self  ,UpperCAmelCase_=768  ,UpperCAmelCase_=12  ,UpperCAmelCase_=12  ,UpperCAmelCase_=3_072  ,UpperCAmelCase_="gelu"  ,UpperCAmelCase_=0.0  ,UpperCAmelCase_=0.0  ,UpperCAmelCase_=0.02  ,UpperCAmelCase_=1E-1_2  ,UpperCAmelCase_=224  ,UpperCAmelCase_=16  ,UpperCAmelCase_=3  ,UpperCAmelCase_=False  ,UpperCAmelCase_=False  ,UpperCAmelCase_=False  ,UpperCAmelCase_=False  ,UpperCAmelCase_=0.1  ,UpperCAmelCase_=0.1  ,UpperCAmelCase_=True  ,UpperCAmelCase_=[3, 5, 7, 11]  ,UpperCAmelCase_=[1, 2, 3, 6]  ,UpperCAmelCase_=True  ,UpperCAmelCase_=0.4  ,UpperCAmelCase_=256  ,UpperCAmelCase_=1  ,UpperCAmelCase_=False  ,UpperCAmelCase_=255  ,**UpperCAmelCase_  ,)	->				List[Any]:
           super().__init__(**UpperCAmelCase_   )

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

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





class 					snake_case			(UpperCamelCase ):
       lowerCAmelCase__	:str     =       version.parse("1.11" )



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







       @property
       def 				_a   (					self   )	->				float:
           return 1E-4









'''simple docstring'''





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


SCREAMING_SNAKE_CASE__          =  {
    "configuration_clap": [
        "CLAP_PRETRAINED_MODEL_ARCHIVE_LIST",
        "ClapAudioConfig",
        "ClapConfig",
        "ClapTextConfig",
    ],
    "processing_clap": ["ClapProcessor"],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 SCREAMING_SNAKE_CASE__          =  [
     "CLAP_PRETRAINED_MODEL_ARCHIVE_LIST",
     "ClapModel",
     "ClapPreTrainedModel",
     "ClapTextModel",
     "ClapTextModelWithProjection",
     "ClapAudioModel",
     "ClapAudioModelWithProjection",
 ]
 SCREAMING_SNAKE_CASE__          =  ["ClapFeatureExtractor"]

if TYPE_CHECKING:
 from .configuration_clap import (
     CLAP_PRETRAINED_MODEL_ARCHIVE_LIST,
     ClapAudioConfig,
     ClapConfig,
     ClapTextConfig,
 )
 from .processing_clap import ClapProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .feature_extraction_clap import ClapFeatureExtractor
  from .modeling_clap import (
      CLAP_PRETRAINED_MODEL_ARCHIVE_LIST,
      ClapAudioModel,
      ClapAudioModelWithProjection,
      ClapModel,
      ClapPreTrainedModel,
      ClapTextModel,
      ClapTextModelWithProjection,
  )


else:
 import sys

 SCREAMING_SNAKE_CASE__          =  _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




