"""simple docstring"""


import warnings

from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCAmelCase_:					Optional[int]     =					logging.get_logger(__name__)

lowerCAmelCase_:					List[Any]     =					{
    "xlnet-base-cased": "https://huggingface.co/xlnet-base-cased/resolve/main/config.json",
    "xlnet-large-cased": "https://huggingface.co/xlnet-large-cased/resolve/main/config.json",
}






class    a__    (   _a	):
   snake_case_							=      "xlnet"
   snake_case_							=      ["mems"]
   snake_case_							=      {
       "n_token": "vocab_size",  # Backward compatibility
       "hidden_size": "d_model",
       "num_attention_heads": "n_head",
       "num_hidden_layers": "n_layer",
   }


   def __init__(     self,				_UpperCAmelCase=3_2000,				_UpperCAmelCase=1024,				_UpperCAmelCase=24,				_UpperCAmelCase=16,				_UpperCAmelCase=4096,				_UpperCAmelCase="gelu",				_UpperCAmelCase=True,				_UpperCAmelCase="bi",				_UpperCAmelCase=0.02,				_UpperCAmelCase=1E-12,				_UpperCAmelCase=0.1,				_UpperCAmelCase=512,				_UpperCAmelCase=None,				_UpperCAmelCase=True,				_UpperCAmelCase=False,				_UpperCAmelCase=False,				_UpperCAmelCase=-1,				_UpperCAmelCase=False,				_UpperCAmelCase="last",				_UpperCAmelCase=True,				_UpperCAmelCase="tanh",				_UpperCAmelCase=0.1,				_UpperCAmelCase=5,				_UpperCAmelCase=5,				_UpperCAmelCase=5,				_UpperCAmelCase=1,				_UpperCAmelCase=2,				**_UpperCAmelCase,				):
        '''simple docstring'''



        lowercase__				 =							vocab_size
        lowercase__				 =							d_model
        lowercase__				 =							n_layer
        lowercase__				 =							n_head
        if d_model % n_head != 0:
             raise ValueError(F'''\'d_model % n_head\' ({d_model % n_head}) should be equal to 0'''  )
        if "d_head" in kwargs:
             if kwargs["d_head"] != d_model // n_head:
                  raise ValueError(
                      F'''`d_head` ({kwargs['d_head']}) should be equal to `d_model // n_head` ({d_model // n_head})'''  )
        lowercase__				 =							d_model // n_head
        lowercase__				 =							ff_activation
        lowercase__				 =							d_inner
        lowercase__				 =							untie_r
        lowercase__				 =							attn_type

        lowercase__				 =							initializer_range
        lowercase__				 =							layer_norm_eps

        lowercase__				 =							dropout
        lowercase__				 =							mem_len
        lowercase__				 =							reuse_len
        lowercase__				 =							bi_data
        lowercase__				 =							clamp_len
        lowercase__				 =							same_length

        lowercase__				 =							summary_type
        lowercase__				 =							summary_use_proj
        lowercase__				 =							summary_activation
        lowercase__				 =							summary_last_dropout
        lowercase__				 =							start_n_top
        lowercase__				 =							end_n_top

        lowercase__				 =							bos_token_id
        lowercase__				 =							pad_token_id
        lowercase__				 =							eos_token_id

        if "use_cache" in kwargs:
             warnings.warn(
                 "The `use_cache` argument is deprecated and will be removed in a future version, use `use_mems_eval`"
                 " instead.",				_UpperCAmelCase,				)
             lowercase__				 =							kwargs["use_cache"]

        lowercase__				 =							use_mems_eval
        lowercase__				 =							use_mems_train
        super().__init__(pad_token_id=_UpperCAmelCase,				bos_token_id=_UpperCAmelCase,				eos_token_id=_UpperCAmelCase,				**_UpperCAmelCase  )


   @property
   def 	snake_case__	(     self  ):
        '''simple docstring'''



        logger.info(F'''The model {self.model_type} is one of the few models that has no sequence length limit.'''  )
        return -1


   @max_position_embeddings.setter
   def 	snake_case__	(     self,				_UpperCAmelCase  ):
        '''simple docstring'''



        raise NotImplementedError(
            F'''The model {self.model_type} is one of the few models that has no sequence length limit.'''  )





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


lowerCAmelCase_:					str     =					logging.get_logger(__name__)

lowerCAmelCase_:					List[Any]     =					{
    "facebook/data2vec-vision-base-ft": (
        "https://huggingface.co/facebook/data2vec-vision-base-ft/resolve/main/config.json"
    ),
}






class    a__    (   _a	):
   snake_case_							=      "data2vec-vision"


   def __init__(     self,				_UpperCAmelCase=768,				_UpperCAmelCase=12,				_UpperCAmelCase=12,				_UpperCAmelCase=3072,				_UpperCAmelCase="gelu",				_UpperCAmelCase=0.0,				_UpperCAmelCase=0.0,				_UpperCAmelCase=0.02,				_UpperCAmelCase=1E-12,				_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,				):
        '''simple docstring'''



        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    a__    (   _a	):
   snake_case_							=      version.parse("1.11"	)


   @property
   def 	snake_case__	(     self  ):
        '''simple docstring'''



        return OrderedDict(
            [
                ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
            ]  )


   @property
   def 	snake_case__	(     self  ):
        '''simple docstring'''



        return 1E-4




