



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

__a          =		{
    "microsoft/beit-base-patch16-224-pt22k": (
        "https://huggingface.co/microsoft/beit-base-patch16-224-pt22k/resolve/main/config.json"
    ),
    # See all BEiT models at https://huggingface.co/models?filter=beit
}







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







    lowercase					=		"beit"




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

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

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







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







    lowercase					=		version.parse("1.11"	)




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




    @property
    def lowerCamelCase       (    self					:     Dict						):
          return 1E-4





'''simple docstring'''





def 						__snake_case(				_lowerCAmelCase     ,   _lowerCAmelCase     ,   _lowerCAmelCase		)		-> float:
      snake_case__  :    str    						=      (num_of_terms / 2) * (2 * first_term + (num_of_terms - 1) * common_diff)
      # formula for sum of series
      return total





def 						__snake_case(				)		-> List[str]:
      print(sum_of_series(1     ,   1     ,   10		)		)


if __name__ == "__main__":
       import doctest

       doctest.testmod()
