



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


_UpperCamelCase											=		logging.get_logger(__name__)

_UpperCamelCase											=		{
    """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 :      int     ,      _a :      int=768     ,      _a :      Any=12     ,      _a :      str=12     ,      _a :      Tuple=3072     ,      _a :      Union[str, Any]="gelu"     ,      _a :      Any=0.0     ,      _a :      Optional[int]=0.0     ,      _a :      int=0.02     ,      _a :      int=1e-12     ,      _a :      Optional[int]=224     ,      _a :      Any=16     ,      _a :      Union[str, Any]=3     ,      _a :      Tuple=False     ,      _a :      Tuple=False     ,      _a :      List[Any]=False     ,      _a :      Optional[int]=False     ,      _a :      Union[str, Any]=0.1     ,      _a :      Tuple=0.1     ,      _a :      List[str]=True     ,      _a :      int=[3, 5, 7, 11]     ,      _a :      int=[1, 2, 3, 6]     ,      _a :      Union[str, Any]=True     ,      _a :      Dict=0.4     ,      _a :      List[Any]=256     ,      _a :      Tuple=1     ,      _a :      Tuple=False     ,      _a :      List[str]=255     ,      **_a :      Dict     ,      )   ->   Optional[int]:
    super().__init__(**__lowerCamelCase  )

    __lowerCamelCase			:			int       			=					hidden_size
    __lowerCamelCase			:			Optional[Any]       			=					num_hidden_layers
    __lowerCamelCase			:			Any       			=					num_attention_heads
    __lowerCamelCase			:			str       			=					intermediate_size
    __lowerCamelCase			:			List[Any]       			=					hidden_act
    __lowerCamelCase			:			Any       			=					hidden_dropout_prob
    __lowerCamelCase			:			List[str]       			=					attention_probs_dropout_prob
    __lowerCamelCase			:			List[str]       			=					initializer_range
    __lowerCamelCase			:			List[Any]       			=					layer_norm_eps

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






class    lowerCamelCase_       (							_a	):
  """simple docstring"""




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




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




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












import numpy as np
def 		a_							( __lowerCAmelCase   , __lowerCAmelCase   , __lowerCAmelCase   , __lowerCAmelCase   , __lowerCAmelCase				):
  lowerCAmelCase__										=      int(np.ceil((x_end - xa) / h				)				)
  lowerCAmelCase__										=      np.zeros((n + 1,)				)
  lowerCAmelCase__										=      ya
  lowerCAmelCase__										=      xa

  for k in range(__lowerCAmelCase				):
    lowerCAmelCase__										=      f(__lowerCAmelCase   , y[k]				)
    lowerCAmelCase__										=      f(x + 0.5 * h   , y[k] + 0.5 * h * ka				)
    lowerCAmelCase__										=      f(x + 0.5 * h   , y[k] + 0.5 * h * ka				)
    lowerCAmelCase__										=      f(x + h   , y[k] + h * ka				)
    lowerCAmelCase__										=      y[k] + (1 / 6) * h * (ka + 2 * ka + 2 * ka + ka)
    x += h

  return y


if __name__ == "__main__":
      import doctest

      doctest.testmod()

