

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


SCREAMING_SNAKE_CASE_					:	Optional[Any]							  =						logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_					:	str							  =						{
    'facebook/data2vec-vision-base-ft': (
        'https://huggingface.co/facebook/data2vec-vision-base-ft/resolve/main/config.json'
    ),
}



class 					a						(       _lowerCamelCase				):



    """simple docstring"""



    UpperCAmelCase						 =					"data2vec-vision"

    def __init__(     self: Optional[int]    ,						UpperCamelCase: Optional[int]=7_68    ,						UpperCamelCase: List[Any]=12    ,						UpperCamelCase: str=12    ,						UpperCamelCase: Any=30_72    ,						UpperCamelCase: int="gelu"    ,						UpperCamelCase: Optional[int]=0.0    ,						UpperCamelCase: List[str]=0.0    ,						UpperCamelCase: str=0.02    ,						UpperCamelCase: Optional[Any]=1e-1_2    ,						UpperCamelCase: Tuple=2_24    ,						UpperCamelCase: Union[str, Any]=16    ,						UpperCamelCase: Dict=3    ,						UpperCamelCase: Optional[int]=False    ,						UpperCamelCase: Optional[Any]=False    ,						UpperCamelCase: Union[str, Any]=False    ,						UpperCamelCase: str=False    ,						UpperCamelCase: List[str]=0.1    ,						UpperCamelCase: List[str]=0.1    ,						UpperCamelCase: Optional[int]=True    ,						UpperCamelCase: str=[3, 5, 7, 11]    ,						UpperCamelCase: Optional[Any]=[1, 2, 3, 6]    ,						UpperCamelCase: Optional[Any]=True    ,						UpperCamelCase: Dict=0.4    ,						UpperCamelCase: List[str]=2_56    ,						UpperCamelCase: int=1    ,						UpperCamelCase: Optional[Any]=False    ,						UpperCamelCase: Optional[Any]=2_55    ,						**UpperCamelCase: Optional[Any]    ,						):






         """simple docstring"""


         super().__init__(**UpperCamelCase       )

         A__										=  hidden_size
         A__										=  num_hidden_layers
         A__										=  num_attention_heads
         A__										=  intermediate_size
         A__										=  hidden_act
         A__										=  hidden_dropout_prob
         A__										=  attention_probs_dropout_prob
         A__										=  initializer_range
         A__										=  layer_norm_eps

         A__										=  image_size
         A__										=  patch_size
         A__										=  num_channels
         A__										=  use_mask_token
         A__										=  use_absolute_position_embeddings
         A__										=  use_relative_position_bias
         A__										=  use_shared_relative_position_bias
         A__										=  layer_scale_init_value
         A__										=  drop_path_rate
         A__										=  use_mean_pooling
         # decode head attributes (semantic segmentation)
         A__										=  out_indices
         A__										=  pool_scales
         # auxiliary head attributes (semantic segmentation)
         A__										=  use_auxiliary_head
         A__										=  auxiliary_loss_weight
         A__										=  auxiliary_channels
         A__										=  auxiliary_num_convs
         A__										=  auxiliary_concat_input
         A__										=  semantic_loss_ignore_index



class 					a						(       _lowerCamelCase				):



    """simple docstring"""



    UpperCAmelCase						 =					version.parse("1.11"				)

    @property
    def 				UpperCamelCase	(     self: Union[str, Any]       ):






         """simple docstring"""


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





    @property
    def 				UpperCamelCase	(     self: List[Any]       ):






         """simple docstring"""


         return 1e-4









"""simple docstring"""



SCREAMING_SNAKE_CASE_					:	str							  =						'0.21.0'

from .accelerator import Accelerator
from .big_modeling import (
    cpu_offload,
    cpu_offload_with_hook,
    disk_offload,
    dispatch_model,
    init_empty_weights,
    init_on_device,
    load_checkpoint_and_dispatch,
)
from .data_loader import skip_first_batches
from .launchers import debug_launcher, notebook_launcher
from .state import PartialState
from .utils import (
    DeepSpeedPlugin,
    DistributedDataParallelKwargs,
    DistributedType,
    FullyShardedDataParallelPlugin,
    GradScalerKwargs,
    InitProcessGroupKwargs,
    find_executable_batch_size,
    infer_auto_device_map,
    is_rich_available,
    load_checkpoint_in_model,
    synchronize_rng_states,
)


if is_rich_available():
 from .utils import rich






