






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

a		:       Union[str, Any]			     = {
    "facebook/data2vec-vision-base-ft": (
        "https://huggingface.co/facebook/data2vec-vision-base-ft/resolve/main/config.json"
    ),
}
class     a    ( lowercase__   ):



      """simple docstring"""


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

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

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


class     a    ( lowercase__   ):



      """simple docstring"""


      a  : Union[str, Any]							       =	version.parse('1.11'   )
      @property
      def 	UpperCAmelCase      (      self					:			List[Any]					)							->      Mapping[str, Mapping[int, str]]:
        return OrderedDict(
            [
                ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
            ]					)




      @property
      def 	UpperCAmelCase      (      self					:			Tuple					)							->      float:
        return 1e-4










def 				lowerCamelCase__      (    __lowerCamelCase			:     Tuple  ,		__lowerCamelCase			:     Union[str, Any]		):
  __UpperCAmelCase							:	Tuple           =  [1]
  for i in range(2  ,		__lowerCamelCase		):
    factorials.append(factorials[-1] * i		)
  assert 0 <= k < factorials[-1] * n, "k out of bounds"

  __UpperCAmelCase							:	Optional[Any]           =  []
  __UpperCAmelCase							:	str           =  list(range(__lowerCamelCase		)		)

  # Find permutation
  while factorials:
    __UpperCAmelCase							:	Any           =  factorials.pop()
    __UpperCAmelCase      , __UpperCAmelCase							:	Optional[Any]           =  divmod(__lowerCamelCase  ,		__lowerCamelCase		)
    permutation.append(elements[number]		)
    elements.remove(elements[number]		)
  permutation.append(elements[0]		)

  return permutation


if __name__ == "__main__":
       import doctest

       doctest.testmod()


