



"""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:   Optional[Any]								=		logging.get_logger(__name__)

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



class       SCREAMING_SNAKE_CASE__  (					UpperCAmelCase__ ):
   __lowerCAmelCase  :   Optional[Any]						=						'data2vec-vision'

   def __init__(   self      ,     _SCREAMING_SNAKE_CASE=768      ,     _SCREAMING_SNAKE_CASE=12      ,     _SCREAMING_SNAKE_CASE=12      ,     _SCREAMING_SNAKE_CASE=3072      ,     _SCREAMING_SNAKE_CASE="gelu"      ,     _SCREAMING_SNAKE_CASE=0.0      ,     _SCREAMING_SNAKE_CASE=0.0      ,     _SCREAMING_SNAKE_CASE=0.02      ,     _SCREAMING_SNAKE_CASE=1E-12      ,     _SCREAMING_SNAKE_CASE=224      ,     _SCREAMING_SNAKE_CASE=16      ,     _SCREAMING_SNAKE_CASE=3      ,     _SCREAMING_SNAKE_CASE=False      ,     _SCREAMING_SNAKE_CASE=False      ,     _SCREAMING_SNAKE_CASE=False      ,     _SCREAMING_SNAKE_CASE=False      ,     _SCREAMING_SNAKE_CASE=0.1      ,     _SCREAMING_SNAKE_CASE=0.1      ,     _SCREAMING_SNAKE_CASE=True      ,     _SCREAMING_SNAKE_CASE=[3, 5, 7, 11]      ,     _SCREAMING_SNAKE_CASE=[1, 2, 3, 6]      ,     _SCREAMING_SNAKE_CASE=True      ,     _SCREAMING_SNAKE_CASE=0.4      ,     _SCREAMING_SNAKE_CASE=256      ,     _SCREAMING_SNAKE_CASE=1      ,     _SCREAMING_SNAKE_CASE=False      ,     _SCREAMING_SNAKE_CASE=255      ,     **_SCREAMING_SNAKE_CASE      ,     )  ->      int:





    '''simple docstring'''




    super().__init__(**_SCREAMING_SNAKE_CASE						)

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

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



class       SCREAMING_SNAKE_CASE__  (					UpperCAmelCase__ ):
   __lowerCAmelCase  :   List[str]						=						version.parse('1.11' )

   @property
   def 	SCREAMING_SNAKE_CASE     (   self						)  ->      Mapping[str, Mapping[int, str]]:





    '''simple docstring'''




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




   @property
   def 	SCREAMING_SNAKE_CASE     (   self						)  ->      float:





    '''simple docstring'''




    return 1E-4



import operator as op


a__				=		'''scaler.pt'''
a__				=		'''pytorch_model'''
a__				=		'''random_states'''
a__				=		'''optimizer'''
a__				=		'''scheduler'''
a__				=		'''pytorch_model.bin'''
a__				=		'''pytorch_model.bin.index.json'''
a__				=		'''model.safetensors'''
a__				=		'''model.safetensors.index.json'''
a__				=		'''1.10.2'''
a__				=		'''py38'''
a__				=		'''4.17.0'''
a__				=		['''ml.p3.16xlarge''', '''ml.p3dn.24xlarge''', '''ml.p4dn.24xlarge''']
a__				=		['''FULL_SHARD''', '''SHARD_GRAD_OP''', '''NO_SHARD''', '''HYBRID_SHARD''', '''HYBRID_SHARD_ZERO2''']
a__				=		['''TRANSFORMER_BASED_WRAP''', '''SIZE_BASED_WRAP''', '''NO_WRAP''']
a__				=		['''BACKWARD_PRE''', '''BACKWARD_POST''', '''NO_PREFETCH''']
a__				=		['''FULL_STATE_DICT''', '''LOCAL_STATE_DICT''', '''SHARDED_STATE_DICT''']
a__				=		'''2.0.1'''
a__				=		['''pdsh''', '''standard''', '''openmpi''', '''mvapich''']
a__				=		['''default''', '''reduce-overhead''', '''max-autotune''']

a__				=		{'''>''': op.gt, '''>=''': op.ge, '''==''': op.eq, '''!=''': op.ne, '''<=''': op.le, '''<''': op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
a__				=		[
    '''nnodes''',
    '''nproc_per_node''',
    '''rdzv_backend''',
    '''rdzv_endpoint''',
    '''rdzv_id''',
    '''rdzv_conf''',
    '''standalone''',
    '''max_restarts''',
    '''monitor_interval''',
    '''start_method''',
    '''role''',
    '''module''',
    '''m''',
    '''no_python''',
    '''run_path''',
    '''log_dir''',
    '''r''',
    '''redirects''',
    '''t''',
    '''tee''',
    '''node_rank''',
    '''master_addr''',
    '''master_port''',
]

a__				=		['''DEEPSPEED''', '''MULTI_GPU''', '''FSDP''', '''MEGATRON_LM''']
a__				=		['''DEEPSPEED''', '''MULTI_XPU''', '''FSDP''']



