
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   =			{
    "facebook/levit-128S": "https://huggingface.co/facebook/levit-128S/resolve/main/config.json",
    # See all LeViT models at https://huggingface.co/models?filter=levit
}







class 					lowerCamelCase		(  _a  ):
					UpperCAmelCase__    :							Union[str, Any]									=		"""levit"""





					def __init__(self				:   Any    ,   _A				:   Optional[int]=2_2_4    ,   _A				:   Union[str, Any]=3    ,   _A				:   Optional[Any]=3    ,   _A				:   str=2    ,   _A				:   str=1    ,   _A				:   Tuple=1_6    ,   _A				:   Dict=[1_2_8, 2_5_6, 3_8_4]    ,   _A				:   List[Any]=[4, 8, 1_2]    ,   _A				:   List[Any]=[4, 4, 4]    ,   _A				:   List[str]=[1_6, 1_6, 1_6]    ,   _A				:   Union[str, Any]=0    ,   _A				:   str=[2, 2, 2]    ,   _A				:   List[Any]=[2, 2, 2]    ,   _A				:   Union[str, Any]=0.02    ,   **_A				:   str    ,   )						->						Optional[Any]:
									super().__init__(**_A       )
									snake_case								= image_size
									snake_case								= num_channels
									snake_case								= kernel_size
									snake_case								= stride
									snake_case								= padding
									snake_case								= hidden_sizes
									snake_case								= num_attention_heads
									snake_case								= depths
									snake_case								= key_dim
									snake_case								= drop_path_rate
									snake_case								= patch_size
									snake_case								= attention_ratio
									snake_case								= mlp_ratio
									snake_case								= initializer_range
									snake_case								= [
									    ['Subsample', key_dim[0], hidden_sizes[0] // key_dim[0], 4, 2, 2],
									    ['Subsample', key_dim[0], hidden_sizes[1] // key_dim[0], 4, 2, 2],
									]







class 					lowerCamelCase		(  _a  ):
					UpperCAmelCase__    :							Any									=		version.parse("1.11"  )





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





					@property
					def 		UpperCAmelCase(self				:   List[str]       )						->						float:
									return 1E-4



from . import (
    albert,
    align,
    altclip,
    audio_spectrogram_transformer,
    auto,
    autoformer,
    bark,
    bart,
    barthez,
    bartpho,
    beit,
    bert,
    bert_generation,
    bert_japanese,
    bertweet,
    big_bird,
    bigbird_pegasus,
    biogpt,
    bit,
    blenderbot,
    blenderbot_small,
    blip,
    blip_a,
    bloom,
    bridgetower,
    byta,
    camembert,
    canine,
    chinese_clip,
    clap,
    clip,
    clipseg,
    codegen,
    conditional_detr,
    convbert,
    convnext,
    convnextva,
    cpm,
    cpmant,
    ctrl,
    cvt,
    dataavec,
    deberta,
    deberta_va,
    decision_transformer,
    deformable_detr,
    deit,
    deprecated,
    deta,
    detr,
    dialogpt,
    dinat,
    distilbert,
    dit,
    donut,
    dpr,
    dpt,
    efficientformer,
    efficientnet,
    electra,
    encodec,
    encoder_decoder,
    ernie,
    ernie_m,
    esm,
    falcon,
    flaubert,
    flava,
    fnet,
    focalnet,
    fsmt,
    funnel,
    git,
    glpn,
    gpta,
    gpt_bigcode,
    gpt_neo,
    gpt_neox,
    gpt_neox_japanese,
    gpt_swa,
    gptj,
    gptsan_japanese,
    graphormer,
    groupvit,
    herbert,
    hubert,
    ibert,
    imagegpt,
    informer,
    instructblip,
    jukebox,
    layoutlm,
    layoutlmva,
    layoutlmva,
    layoutxlm,
    led,
    levit,
    lilt,
    llama,
    longformer,
    longta,
    luke,
    lxmert,
    mam_aaa,
    marian,
    markuplm,
    maskaformer,
    maskformer,
    mbart,
    mbartaa,
    mega,
    megatron_bert,
    megatron_gpta,
    mgp_str,
    mluke,
    mobilebert,
    mobilenet_va,
    mobilenet_va,
    mobilevit,
    mobilevitva,
    mpnet,
    mra,
    mta,
    musicgen,
    mvp,
    nat,
    nezha,
    nllb,
    nllb_moe,
    nystromformer,
    oneformer,
    open_llama,
    openai,
    opt,
    owlvit,
    pegasus,
    pegasus_x,
    perceiver,
    phobert,
    pixastruct,
    plbart,
    poolformer,
    prophetnet,
    qdqbert,
    rag,
    realm,
    reformer,
    regnet,
    rembert,
    resnet,
    roberta,
    roberta_prelayernorm,
    roc_bert,
    roformer,
    rwkv,
    sam,
    segformer,
    sew,
    sew_d,
    speech_encoder_decoder,
    speech_to_text,
    speech_to_text_a,
    speechta,
    splinter,
    squeezebert,
    swiftformer,
    swin,
    swinasr,
    swinva,
    switch_transformers,
    ta,
    table_transformer,
    tapas,
    time_series_transformer,
    timesformer,
    timm_backbone,
    transfo_xl,
    trocr,
    tvlt,
    umta,
    unispeech,
    unispeech_sat,
    upernet,
    videomae,
    vilt,
    vision_encoder_decoder,
    vision_text_dual_encoder,
    visual_bert,
    vit,
    vit_hybrid,
    vit_mae,
    vit_msn,
    vivit,
    wavaveca,
    wavaveca_conformer,
    wavaveca_phoneme,
    wavaveca_with_lm,
    wavlm,
    whisper,
    x_clip,
    xglm,
    xlm,
    xlm_prophetnet,
    xlm_roberta,
    xlm_roberta_xl,
    xlnet,
    xmod,
    yolos,
    yoso,
)

