import{S as Ua,i as Ba,s as Ga,e as r,k as m,w as v,t as n,M as Ja,c as a,d as t,m as h,a as s,x as T,h as i,b as d,G as o,g as f,y as w,q as $,o as V,B as H,v as Xa,L as Xr}from"../../chunks/vendor-hf-doc-builder.js";import{T as Wa}from"../../chunks/Tip-hf-doc-builder.js";import{D as pe}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Kr}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Re}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Jr}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as Ka}from"../../chunks/PipelineTag-hf-doc-builder.js";function Ya(x){let p,y,_,g,b;return g=new Kr({props:{code:`from transformers import ViTHybridConfig, ViTHybridModel

# Initializing a ViT Hybrid vit-hybrid-base-bit-384 style configuration
configuration = ViTHybridConfig()

# Initializing a model (with random weights) from the vit-hybrid-base-bit-384 style configuration
model = ViTHybridModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ViTHybridConfig, ViTHybridModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ViT Hybrid vit-hybrid-base-bit-384 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ViTHybridConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the vit-hybrid-base-bit-384 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTHybridModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){p=r("p"),y=n("Example:"),_=m(),v(g.$$.fragment)},l(l){p=a(l,"P",{});var u=s(p);y=i(u,"Example:"),u.forEach(t),_=h(l),T(g.$$.fragment,l)},m(l,u){f(l,p,u),o(p,y),f(l,_,u),w(g,l,u),b=!0},p:Xr,i(l){b||($(g.$$.fragment,l),b=!0)},o(l){V(g.$$.fragment,l),b=!1},d(l){l&&t(p),l&&t(_),H(g,l)}}}function Za(x){let p,y,_,g,b;return{c(){p=r("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r("code"),g=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){p=a(l,"P",{});var u=s(p);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var E=s(_);g=i(E,"Module"),E.forEach(t),b=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){f(l,p,u),o(p,y),o(p,_),o(_,g),o(p,b)},d(l){l&&t(p)}}}function Qa(x){let p,y,_,g,b;return g=new Kr({props:{code:`from transformers import AutoImageProcessor, ViTHybridModel
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

image_processor = AutoImageProcessor.from_pretrained("google/vit-hybrid-base-bit-384")
model = ViTHybridModel.from_pretrained("google/vit-hybrid-base-bit-384")

inputs = image_processor(image, return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ViTHybridModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;google/vit-hybrid-base-bit-384&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTHybridModel.from_pretrained(<span class="hljs-string">&quot;google/vit-hybrid-base-bit-384&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">197</span>, <span class="hljs-number">768</span>]`}}),{c(){p=r("p"),y=n("Example:"),_=m(),v(g.$$.fragment)},l(l){p=a(l,"P",{});var u=s(p);y=i(u,"Example:"),u.forEach(t),_=h(l),T(g.$$.fragment,l)},m(l,u){f(l,p,u),o(p,y),f(l,_,u),w(g,l,u),b=!0},p:Xr,i(l){b||($(g.$$.fragment,l),b=!0)},o(l){V(g.$$.fragment,l),b=!1},d(l){l&&t(p),l&&t(_),H(g,l)}}}function es(x){let p,y,_,g,b;return{c(){p=r("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r("code"),g=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){p=a(l,"P",{});var u=s(p);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var E=s(_);g=i(E,"Module"),E.forEach(t),b=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){f(l,p,u),o(p,y),o(p,_),o(_,g),o(p,b)},d(l){l&&t(p)}}}function os(x){let p,y,_,g,b;return g=new Kr({props:{code:`from transformers import AutoImageProcessor, ViTHybridForImageClassification
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

image_processor = AutoImageProcessor.from_pretrained("google/vit-hybrid-base-bit-384")
model = ViTHybridForImageClassification.from_pretrained("google/vit-hybrid-base-bit-384")

inputs = image_processor(image, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# model predicts one of the 1000 ImageNet classes
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ViTHybridForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;google/vit-hybrid-base-bit-384&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTHybridForImageClassification.from_pretrained(<span class="hljs-string">&quot;google/vit-hybrid-base-bit-384&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`}}),{c(){p=r("p"),y=n("Example:"),_=m(),v(g.$$.fragment)},l(l){p=a(l,"P",{});var u=s(p);y=i(u,"Example:"),u.forEach(t),_=h(l),T(g.$$.fragment,l)},m(l,u){f(l,p,u),o(p,y),f(l,_,u),w(g,l,u),b=!0},p:Xr,i(l){b||($(g.$$.fragment,l),b=!0)},o(l){V(g.$$.fragment,l),b=!1},d(l){l&&t(p),l&&t(_),H(g,l)}}}function ts(x){let p,y,_,g,b,l,u,E,ct,jo,D,X,po,fe,mt,fo,ht,No,P,pt,ge,ft,gt,Le,ut,_t,We,bt,yt,Fo,Ue,vt,Do,Be,go,Tt,qo,j,wt,ue,$t,Vt,_e,Ht,It,So,q,K,uo,be,kt,_o,xt,Oo,Ge,Pt,Ro,ye,Lo,Y,N,Je,Ct,zt,ve,Et,At,Te,Mt,jt,Nt,Xe,Ft,Ke,Dt,Wo,Ye,qt,Uo,S,Z,bo,we,St,yo,Ot,Bo,I,$e,Rt,O,Lt,Ze,Wt,Ut,Ve,Bt,Gt,Jt,R,Xt,Qe,Kt,Yt,eo,Zt,Qt,er,Q,or,ee,He,tr,L,rr,oo,ar,sr,vo,nr,ir,Go,W,oe,To,Ie,lr,wo,dr,Jo,A,ke,cr,$o,mr,hr,te,xe,pr,Vo,fr,Xo,U,re,Ho,Pe,gr,Io,ur,Ko,M,Ce,_r,ze,br,Ee,yr,vr,Tr,C,Ae,wr,B,$r,to,Vr,Hr,ko,Ir,kr,xr,ae,Pr,se,Yo,G,ne,xo,Me,Cr,Po,zr,Zo,k,je,Er,Co,Ar,Mr,Ne,jr,Fe,Nr,Fr,Dr,z,De,qr,J,Sr,ro,Or,Rr,zo,Lr,Wr,Ur,ie,Br,le,Qo;return l=new Re({}),fe=new Re({}),be=new Re({}),ye=new Ka({props:{pipeline:"image-classification"}}),we=new Re({}),$e=new pe({props:{name:"class transformers.ViTHybridConfig",anchor:"transformers.ViTHybridConfig",parameters:[{name:"backbone_config",val:" = None"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 1"},{name:"num_channels",val:" = 3"},{name:"backbone_featmap_shape",val:" = [1, 1024, 24, 24]"},{name:"qkv_bias",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ViTHybridConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.ViTHybridConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.ViTHybridConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.ViTHybridConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.ViTHybridConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.ViTHybridConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.ViTHybridConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.ViTHybridConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.ViTHybridConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.ViTHybridConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.ViTHybridConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.ViTHybridConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.ViTHybridConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries, keys and values.`,name:"qkv_bias"},{anchor:"transformers.ViTHybridConfig.backbone_config",description:`<strong>backbone_config</strong> (<code>Union[Dict[str, Any], PretrainedConfig]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The configuration of the backbone in a dictionary or the config object of the backbone.`,name:"backbone_config"},{anchor:"transformers.ViTHybridConfig.backbone_featmap_shape",description:`<strong>backbone_featmap_shape</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 1024, 24, 24]</code>) &#x2014;
Used only for the <code>hybrid</code> embedding type. The shape of the feature maps of the backbone.`,name:"backbone_featmap_shape"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/vit_hybrid/configuration_vit_hybrid.py#L34"}}),Q=new Jr({props:{anchor:"transformers.ViTHybridConfig.example",$$slots:{default:[Ya]},$$scope:{ctx:x}}}),He=new pe({props:{name:"to_dict",anchor:"transformers.ViTHybridConfig.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/vit_hybrid/configuration_vit_hybrid.py#L150"}}),Ie=new Re({}),ke=new pe({props:{name:"class transformers.ViTHybridImageProcessor",anchor:"transformers.ViTHybridImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_convert_rgb",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ViTHybridImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by
<code>do_resize</code> in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.ViTHybridImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 224}</code>):
Size of the image after resizing. The shortest edge of the image is resized to size[&#x201C;shortest_edge&#x201D;], with
the longest edge resized to keep the input aspect ratio. Can be overridden by <code>size</code> in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.ViTHybridImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BICUBIC</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by <code>resample</code> in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.ViTHybridImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to center crop the image to the specified <code>crop_size</code>. Can be overridden by <code>do_center_crop</code> in the
<code>preprocess</code> method.`,name:"do_center_crop"},{anchor:"transformers.ViTHybridImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to 224) &#x2014;
Size of the output image after applying <code>center_crop</code>. Can be overridden by <code>crop_size</code> in the <code>preprocess</code>
method.`,name:"crop_size"},{anchor:"transformers.ViTHybridImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by <code>do_rescale</code> in
the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.ViTHybridImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by <code>rescale_factor</code> in the <code>preprocess</code>
method.
do_normalize &#x2014;
Whether to normalize the image. Can be overridden by <code>do_normalize</code> in the <code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.ViTHybridImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.ViTHybridImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Image standard deviation.`,name:"image_std"},{anchor:"transformers.ViTHybridImageProcessor.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"do_convert_rgb"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/vit_hybrid/image_processing_vit_hybrid.py#L51"}}),xe=new pe({props:{name:"preprocess",anchor:"transformers.ViTHybridImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": bool = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": bool = None"},{name:"crop_size",val:": int = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"do_normalize",val:": bool = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_convert_rgb",val:": bool = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Optional[transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ViTHybridImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess.`,name:"images"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after resizing. Shortest edge of the image is resized to size[&#x201C;shortest_edge&#x201D;], with
the longest edge resized to keep the input aspect ratio.`,name:"size"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>. Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image.`,name:"do_center_crop"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the center crop. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.`,name:"crop_size"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image.`,name:"do_rescale"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to use for normalization. Only has an effect if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to use for normalization. Only has an effect if <code>do_normalize</code> is set to
<code>True</code>.`,name:"image_std"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_convert_rgb</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: defaults to the channel dimension format of the input image.</li>
</ul>`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/vit_hybrid/image_processing_vit_hybrid.py#L219"}}),Pe=new Re({}),Ce=new pe({props:{name:"class transformers.ViTHybridModel",anchor:"transformers.ViTHybridModel",parameters:[{name:"config",val:": ViTHybridConfig"},{name:"add_pooling_layer",val:": bool = True"},{name:"use_mask_token",val:": bool = False"}],parametersDescription:[{anchor:"transformers.ViTHybridModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/vit_hybrid#transformers.ViTHybridConfig">ViTHybridConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/vit_hybrid/modeling_vit_hybrid.py#L533"}}),Ae=new pe({props:{name:"forward",anchor:"transformers.ViTHybridModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"bool_masked_pos",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ViTHybridModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.29.0/en/model_doc/dpt#transformers.DPTFeatureExtractor.__call__">ViTHybridImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.ViTHybridModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ViTHybridModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.ViTHybridModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.ViTHybridModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ViTHybridModel.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, num_patches)</code>, <em>optional</em>) &#x2014;
Boolean masked positions. Indicates which patches are masked (1) and which aren&#x2019;t (0).`,name:"bool_masked_pos"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/vit_hybrid/modeling_vit_hybrid.py#L558",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/vit_hybrid#transformers.ViTHybridConfig"
>ViTHybridConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ae=new Wa({props:{$$slots:{default:[Za]},$$scope:{ctx:x}}}),se=new Jr({props:{anchor:"transformers.ViTHybridModel.forward.example",$$slots:{default:[Qa]},$$scope:{ctx:x}}}),Me=new Re({}),je=new pe({props:{name:"class transformers.ViTHybridForImageClassification",anchor:"transformers.ViTHybridForImageClassification",parameters:[{name:"config",val:": ViTHybridConfig"}],parametersDescription:[{anchor:"transformers.ViTHybridForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/vit_hybrid#transformers.ViTHybridConfig">ViTHybridConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/vit_hybrid/modeling_vit_hybrid.py#L652"}}),De=new pe({props:{name:"forward",anchor:"transformers.ViTHybridForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ViTHybridForImageClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.29.0/en/model_doc/dpt#transformers.DPTFeatureExtractor.__call__">ViTHybridImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.ViTHybridForImageClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ViTHybridForImageClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.ViTHybridForImageClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.ViTHybridForImageClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ViTHybridForImageClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/vit_hybrid/modeling_vit_hybrid.py#L665",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/vit_hybrid#transformers.ViTHybridConfig"
>ViTHybridConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each stage) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states
(also called feature maps) of the model at the output of each stage.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ie=new Wa({props:{$$slots:{default:[es]},$$scope:{ctx:x}}}),le=new Jr({props:{anchor:"transformers.ViTHybridForImageClassification.forward.example",$$slots:{default:[os]},$$scope:{ctx:x}}}),{c(){p=r("meta"),y=m(),_=r("h1"),g=r("a"),b=r("span"),v(l.$$.fragment),u=m(),E=r("span"),ct=n("Hybrid Vision Transformer (ViT Hybrid)"),jo=m(),D=r("h2"),X=r("a"),po=r("span"),v(fe.$$.fragment),mt=m(),fo=r("span"),ht=n("Overview"),No=m(),P=r("p"),pt=n("The hybrid Vision Transformer (ViT) model was proposed in "),ge=r("a"),ft=n(`An Image is Worth 16x16 Words: Transformers for Image Recognition
at Scale`),gt=n(` by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk
Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob
Uszkoreit, Neil Houlsby. It\u2019s the first paper that successfully trains a Transformer encoder on ImageNet, attaining
very good results compared to familiar convolutional architectures. ViT hybrid is a slight variant of the `),Le=r("a"),ut=n("plain Vision Transformer"),_t=n(`,
by leveraging a convolutional backbone (specifically, `),We=r("a"),bt=n("BiT"),yt=n(") whose features are used as initial \u201Ctokens\u201D for the Transformer."),Fo=m(),Ue=r("p"),vt=n("The abstract from the paper is the following:"),Do=m(),Be=r("p"),go=r("em"),Tt=n(`While the Transformer architecture has become the de-facto standard for natural language processing tasks, its
applications to computer vision remain limited. In vision, attention is either applied in conjunction with
convolutional networks, or used to replace certain components of convolutional networks while keeping their overall
structure in place. We show that this reliance on CNNs is not necessary and a pure transformer applied directly to
sequences of image patches can perform very well on image classification tasks. When pre-trained on large amounts of
data and transferred to multiple mid-sized or small image recognition benchmarks (ImageNet, CIFAR-100, VTAB, etc.),
Vision Transformer (ViT) attains excellent results compared to state-of-the-art convolutional networks while requiring
substantially fewer computational resources to train.`),qo=m(),j=r("p"),wt=n("This model was contributed by "),ue=r("a"),$t=n("nielsr"),Vt=n(`. The original code (written in JAX) can be
found `),_e=r("a"),Ht=n("here"),It=n("."),So=m(),q=r("h2"),K=r("a"),uo=r("span"),v(be.$$.fragment),kt=m(),_o=r("span"),xt=n("Resources"),Oo=m(),Ge=r("p"),Pt=n("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with ViT Hybrid."),Ro=m(),v(ye.$$.fragment),Lo=m(),Y=r("ul"),N=r("li"),Je=r("a"),Ct=n("ViTHybridForImageClassification"),zt=n(" is supported by this "),ve=r("a"),Et=n("example script"),At=n(" and "),Te=r("a"),Mt=n("notebook"),jt=n("."),Nt=m(),Xe=r("li"),Ft=n("See also: "),Ke=r("a"),Dt=n("Image classification task guide"),Wo=m(),Ye=r("p"),qt=n("If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Uo=m(),S=r("h2"),Z=r("a"),bo=r("span"),v(we.$$.fragment),St=m(),yo=r("span"),Ot=n("ViTHybridConfig"),Bo=m(),I=r("div"),v($e.$$.fragment),Rt=m(),O=r("p"),Lt=n("This is the configuration class to store the configuration of a "),Ze=r("a"),Wt=n("ViTHybridModel"),Ut=n(`. It is used to instantiate a ViT
Hybrid model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the ViT Hybrid
`),Ve=r("a"),Bt=n("google/vit-hybrid-base-bit-384"),Gt=n(" architecture."),Jt=m(),R=r("p"),Xt=n("Configuration objects inherit from "),Qe=r("a"),Kt=n("PretrainedConfig"),Yt=n(` and can be used to control the model outputs. Read the
documentation from `),eo=r("a"),Zt=n("PretrainedConfig"),Qt=n(" for more information."),er=m(),v(Q.$$.fragment),or=m(),ee=r("div"),v(He.$$.fragment),tr=m(),L=r("p"),rr=n("Serializes this instance to a Python dictionary. Override the default "),oo=r("a"),ar=n("to_dict()"),sr=n(`. Returns:
`),vo=r("code"),nr=n("Dict[str, any]"),ir=n(": Dictionary of all the attributes that make up this configuration instance,"),Go=m(),W=r("h2"),oe=r("a"),To=r("span"),v(Ie.$$.fragment),lr=m(),wo=r("span"),dr=n("ViTHybridImageProcessor"),Jo=m(),A=r("div"),v(ke.$$.fragment),cr=m(),$o=r("p"),mr=n("Constructs a ViT Hybrid image processor."),hr=m(),te=r("div"),v(xe.$$.fragment),pr=m(),Vo=r("p"),fr=n("Preprocess an image or batch of images."),Xo=m(),U=r("h2"),re=r("a"),Ho=r("span"),v(Pe.$$.fragment),gr=m(),Io=r("span"),ur=n("ViTHybridModel"),Ko=m(),M=r("div"),v(Ce.$$.fragment),_r=m(),ze=r("p"),br=n(`The bare ViT Hybrid Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ee=r("a"),yr=n("torch.nn.Module"),vr=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Tr=m(),C=r("div"),v(Ae.$$.fragment),wr=m(),B=r("p"),$r=n("The "),to=r("a"),Vr=n("ViTHybridModel"),Hr=n(" forward method, overrides the "),ko=r("code"),Ir=n("__call__"),kr=n(" special method."),xr=m(),v(ae.$$.fragment),Pr=m(),v(se.$$.fragment),Yo=m(),G=r("h2"),ne=r("a"),xo=r("span"),v(Me.$$.fragment),Cr=m(),Po=r("span"),zr=n("ViTHybridForImageClassification"),Zo=m(),k=r("div"),v(je.$$.fragment),Er=m(),Co=r("p"),Ar=n(`ViT Hybrid Model transformer with an image classification head on top (a linear layer on top of the final hidden
state of the [CLS] token) e.g. for ImageNet.`),Mr=m(),Ne=r("p"),jr=n("This model is a PyTorch "),Fe=r("a"),Nr=n("torch.nn.Module"),Fr=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Dr=m(),z=r("div"),v(De.$$.fragment),qr=m(),J=r("p"),Sr=n("The "),ro=r("a"),Or=n("ViTHybridForImageClassification"),Rr=n(" forward method, overrides the "),zo=r("code"),Lr=n("__call__"),Wr=n(" special method."),Ur=m(),v(ie.$$.fragment),Br=m(),v(le.$$.fragment),this.h()},l(e){const c=Ja('[data-svelte="svelte-1phssyn"]',document.head);p=a(c,"META",{name:!0,content:!0}),c.forEach(t),y=h(e),_=a(e,"H1",{class:!0});var qe=s(_);g=a(qe,"A",{id:!0,class:!0,href:!0});var Eo=s(g);b=a(Eo,"SPAN",{});var Ao=s(b);T(l.$$.fragment,Ao),Ao.forEach(t),Eo.forEach(t),u=h(qe),E=a(qe,"SPAN",{});var Mo=s(E);ct=i(Mo,"Hybrid Vision Transformer (ViT Hybrid)"),Mo.forEach(t),qe.forEach(t),jo=h(e),D=a(e,"H2",{class:!0});var Se=s(D);X=a(Se,"A",{id:!0,class:!0,href:!0});var Yr=s(X);po=a(Yr,"SPAN",{});var Zr=s(po);T(fe.$$.fragment,Zr),Zr.forEach(t),Yr.forEach(t),mt=h(Se),fo=a(Se,"SPAN",{});var Qr=s(fo);ht=i(Qr,"Overview"),Qr.forEach(t),Se.forEach(t),No=h(e),P=a(e,"P",{});var de=s(P);pt=i(de,"The hybrid Vision Transformer (ViT) model was proposed in "),ge=a(de,"A",{href:!0,rel:!0});var ea=s(ge);ft=i(ea,`An Image is Worth 16x16 Words: Transformers for Image Recognition
at Scale`),ea.forEach(t),gt=i(de,` by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk
Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob
Uszkoreit, Neil Houlsby. It\u2019s the first paper that successfully trains a Transformer encoder on ImageNet, attaining
very good results compared to familiar convolutional architectures. ViT hybrid is a slight variant of the `),Le=a(de,"A",{href:!0});var oa=s(Le);ut=i(oa,"plain Vision Transformer"),oa.forEach(t),_t=i(de,`,
by leveraging a convolutional backbone (specifically, `),We=a(de,"A",{href:!0});var ta=s(We);bt=i(ta,"BiT"),ta.forEach(t),yt=i(de,") whose features are used as initial \u201Ctokens\u201D for the Transformer."),de.forEach(t),Fo=h(e),Ue=a(e,"P",{});var ra=s(Ue);vt=i(ra,"The abstract from the paper is the following:"),ra.forEach(t),Do=h(e),Be=a(e,"P",{});var aa=s(Be);go=a(aa,"EM",{});var sa=s(go);Tt=i(sa,`While the Transformer architecture has become the de-facto standard for natural language processing tasks, its
applications to computer vision remain limited. In vision, attention is either applied in conjunction with
convolutional networks, or used to replace certain components of convolutional networks while keeping their overall
structure in place. We show that this reliance on CNNs is not necessary and a pure transformer applied directly to
sequences of image patches can perform very well on image classification tasks. When pre-trained on large amounts of
data and transferred to multiple mid-sized or small image recognition benchmarks (ImageNet, CIFAR-100, VTAB, etc.),
Vision Transformer (ViT) attains excellent results compared to state-of-the-art convolutional networks while requiring
substantially fewer computational resources to train.`),sa.forEach(t),aa.forEach(t),qo=h(e),j=a(e,"P",{});var ao=s(j);wt=i(ao,"This model was contributed by "),ue=a(ao,"A",{href:!0,rel:!0});var na=s(ue);$t=i(na,"nielsr"),na.forEach(t),Vt=i(ao,`. The original code (written in JAX) can be
found `),_e=a(ao,"A",{href:!0,rel:!0});var ia=s(_e);Ht=i(ia,"here"),ia.forEach(t),It=i(ao,"."),ao.forEach(t),So=h(e),q=a(e,"H2",{class:!0});var et=s(q);K=a(et,"A",{id:!0,class:!0,href:!0});var la=s(K);uo=a(la,"SPAN",{});var da=s(uo);T(be.$$.fragment,da),da.forEach(t),la.forEach(t),kt=h(et),_o=a(et,"SPAN",{});var ca=s(_o);xt=i(ca,"Resources"),ca.forEach(t),et.forEach(t),Oo=h(e),Ge=a(e,"P",{});var ma=s(Ge);Pt=i(ma,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with ViT Hybrid."),ma.forEach(t),Ro=h(e),T(ye.$$.fragment,e),Lo=h(e),Y=a(e,"UL",{});var ot=s(Y);N=a(ot,"LI",{});var Oe=s(N);Je=a(Oe,"A",{href:!0});var ha=s(Je);Ct=i(ha,"ViTHybridForImageClassification"),ha.forEach(t),zt=i(Oe," is supported by this "),ve=a(Oe,"A",{href:!0,rel:!0});var pa=s(ve);Et=i(pa,"example script"),pa.forEach(t),At=i(Oe," and "),Te=a(Oe,"A",{href:!0,rel:!0});var fa=s(Te);Mt=i(fa,"notebook"),fa.forEach(t),jt=i(Oe,"."),Oe.forEach(t),Nt=h(ot),Xe=a(ot,"LI",{});var Gr=s(Xe);Ft=i(Gr,"See also: "),Ke=a(Gr,"A",{href:!0});var ga=s(Ke);Dt=i(ga,"Image classification task guide"),ga.forEach(t),Gr.forEach(t),ot.forEach(t),Wo=h(e),Ye=a(e,"P",{});var ua=s(Ye);qt=i(ua,"If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),ua.forEach(t),Uo=h(e),S=a(e,"H2",{class:!0});var tt=s(S);Z=a(tt,"A",{id:!0,class:!0,href:!0});var _a=s(Z);bo=a(_a,"SPAN",{});var ba=s(bo);T(we.$$.fragment,ba),ba.forEach(t),_a.forEach(t),St=h(tt),yo=a(tt,"SPAN",{});var ya=s(yo);Ot=i(ya,"ViTHybridConfig"),ya.forEach(t),tt.forEach(t),Bo=h(e),I=a(e,"DIV",{class:!0});var F=s(I);T($e.$$.fragment,F),Rt=h(F),O=a(F,"P",{});var so=s(O);Lt=i(so,"This is the configuration class to store the configuration of a "),Ze=a(so,"A",{href:!0});var va=s(Ze);Wt=i(va,"ViTHybridModel"),va.forEach(t),Ut=i(so,`. It is used to instantiate a ViT
Hybrid model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the ViT Hybrid
`),Ve=a(so,"A",{href:!0,rel:!0});var Ta=s(Ve);Bt=i(Ta,"google/vit-hybrid-base-bit-384"),Ta.forEach(t),Gt=i(so," architecture."),so.forEach(t),Jt=h(F),R=a(F,"P",{});var no=s(R);Xt=i(no,"Configuration objects inherit from "),Qe=a(no,"A",{href:!0});var wa=s(Qe);Kt=i(wa,"PretrainedConfig"),wa.forEach(t),Yt=i(no,` and can be used to control the model outputs. Read the
documentation from `),eo=a(no,"A",{href:!0});var $a=s(eo);Zt=i($a,"PretrainedConfig"),$a.forEach(t),Qt=i(no," for more information."),no.forEach(t),er=h(F),T(Q.$$.fragment,F),or=h(F),ee=a(F,"DIV",{class:!0});var rt=s(ee);T(He.$$.fragment,rt),tr=h(rt),L=a(rt,"P",{});var io=s(L);rr=i(io,"Serializes this instance to a Python dictionary. Override the default "),oo=a(io,"A",{href:!0});var Va=s(oo);ar=i(Va,"to_dict()"),Va.forEach(t),sr=i(io,`. Returns:
`),vo=a(io,"CODE",{});var Ha=s(vo);nr=i(Ha,"Dict[str, any]"),Ha.forEach(t),ir=i(io,": Dictionary of all the attributes that make up this configuration instance,"),io.forEach(t),rt.forEach(t),F.forEach(t),Go=h(e),W=a(e,"H2",{class:!0});var at=s(W);oe=a(at,"A",{id:!0,class:!0,href:!0});var Ia=s(oe);To=a(Ia,"SPAN",{});var ka=s(To);T(Ie.$$.fragment,ka),ka.forEach(t),Ia.forEach(t),lr=h(at),wo=a(at,"SPAN",{});var xa=s(wo);dr=i(xa,"ViTHybridImageProcessor"),xa.forEach(t),at.forEach(t),Jo=h(e),A=a(e,"DIV",{class:!0});var lo=s(A);T(ke.$$.fragment,lo),cr=h(lo),$o=a(lo,"P",{});var Pa=s($o);mr=i(Pa,"Constructs a ViT Hybrid image processor."),Pa.forEach(t),hr=h(lo),te=a(lo,"DIV",{class:!0});var st=s(te);T(xe.$$.fragment,st),pr=h(st),Vo=a(st,"P",{});var Ca=s(Vo);fr=i(Ca,"Preprocess an image or batch of images."),Ca.forEach(t),st.forEach(t),lo.forEach(t),Xo=h(e),U=a(e,"H2",{class:!0});var nt=s(U);re=a(nt,"A",{id:!0,class:!0,href:!0});var za=s(re);Ho=a(za,"SPAN",{});var Ea=s(Ho);T(Pe.$$.fragment,Ea),Ea.forEach(t),za.forEach(t),gr=h(nt),Io=a(nt,"SPAN",{});var Aa=s(Io);ur=i(Aa,"ViTHybridModel"),Aa.forEach(t),nt.forEach(t),Ko=h(e),M=a(e,"DIV",{class:!0});var co=s(M);T(Ce.$$.fragment,co),_r=h(co),ze=a(co,"P",{});var it=s(ze);br=i(it,`The bare ViT Hybrid Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ee=a(it,"A",{href:!0,rel:!0});var Ma=s(Ee);yr=i(Ma,"torch.nn.Module"),Ma.forEach(t),vr=i(it,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),it.forEach(t),Tr=h(co),C=a(co,"DIV",{class:!0});var ce=s(C);T(Ae.$$.fragment,ce),wr=h(ce),B=a(ce,"P",{});var mo=s(B);$r=i(mo,"The "),to=a(mo,"A",{href:!0});var ja=s(to);Vr=i(ja,"ViTHybridModel"),ja.forEach(t),Hr=i(mo," forward method, overrides the "),ko=a(mo,"CODE",{});var Na=s(ko);Ir=i(Na,"__call__"),Na.forEach(t),kr=i(mo," special method."),mo.forEach(t),xr=h(ce),T(ae.$$.fragment,ce),Pr=h(ce),T(se.$$.fragment,ce),ce.forEach(t),co.forEach(t),Yo=h(e),G=a(e,"H2",{class:!0});var lt=s(G);ne=a(lt,"A",{id:!0,class:!0,href:!0});var Fa=s(ne);xo=a(Fa,"SPAN",{});var Da=s(xo);T(Me.$$.fragment,Da),Da.forEach(t),Fa.forEach(t),Cr=h(lt),Po=a(lt,"SPAN",{});var qa=s(Po);zr=i(qa,"ViTHybridForImageClassification"),qa.forEach(t),lt.forEach(t),Zo=h(e),k=a(e,"DIV",{class:!0});var me=s(k);T(je.$$.fragment,me),Er=h(me),Co=a(me,"P",{});var Sa=s(Co);Ar=i(Sa,`ViT Hybrid Model transformer with an image classification head on top (a linear layer on top of the final hidden
state of the [CLS] token) e.g. for ImageNet.`),Sa.forEach(t),Mr=h(me),Ne=a(me,"P",{});var dt=s(Ne);jr=i(dt,"This model is a PyTorch "),Fe=a(dt,"A",{href:!0,rel:!0});var Oa=s(Fe);Nr=i(Oa,"torch.nn.Module"),Oa.forEach(t),Fr=i(dt,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),dt.forEach(t),Dr=h(me),z=a(me,"DIV",{class:!0});var he=s(z);T(De.$$.fragment,he),qr=h(he),J=a(he,"P",{});var ho=s(J);Sr=i(ho,"The "),ro=a(ho,"A",{href:!0});var Ra=s(ro);Or=i(Ra,"ViTHybridForImageClassification"),Ra.forEach(t),Rr=i(ho," forward method, overrides the "),zo=a(ho,"CODE",{});var La=s(zo);Lr=i(La,"__call__"),La.forEach(t),Wr=i(ho," special method."),ho.forEach(t),Ur=h(he),T(ie.$$.fragment,he),Br=h(he),T(le.$$.fragment,he),he.forEach(t),me.forEach(t),this.h()},h(){d(p,"name","hf:doc:metadata"),d(p,"content",JSON.stringify(rs)),d(g,"id","hybrid-vision-transformer-vit-hybrid"),d(g,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(g,"href","#hybrid-vision-transformer-vit-hybrid"),d(_,"class","relative group"),d(X,"id","overview"),d(X,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(X,"href","#overview"),d(D,"class","relative group"),d(ge,"href","https://arxiv.org/abs/2010.11929"),d(ge,"rel","nofollow"),d(Le,"href","vit"),d(We,"href","bit"),d(ue,"href","https://huggingface.co/nielsr"),d(ue,"rel","nofollow"),d(_e,"href","https://github.com/google-research/vision_transformer"),d(_e,"rel","nofollow"),d(K,"id","resources"),d(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(K,"href","#resources"),d(q,"class","relative group"),d(Je,"href","/docs/transformers/v4.29.0/en/model_doc/vit_hybrid#transformers.ViTHybridForImageClassification"),d(ve,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification"),d(ve,"rel","nofollow"),d(Te,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb"),d(Te,"rel","nofollow"),d(Ke,"href","../tasks/image_classification"),d(Z,"id","transformers.ViTHybridConfig"),d(Z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Z,"href","#transformers.ViTHybridConfig"),d(S,"class","relative group"),d(Ze,"href","/docs/transformers/v4.29.0/en/model_doc/vit_hybrid#transformers.ViTHybridModel"),d(Ve,"href","https://huggingface.co/google/vit-hybrid-base-bit-384"),d(Ve,"rel","nofollow"),d(Qe,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(eo,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(oo,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig.to_dict"),d(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(oe,"id","transformers.ViTHybridImageProcessor"),d(oe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(oe,"href","#transformers.ViTHybridImageProcessor"),d(W,"class","relative group"),d(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(re,"id","transformers.ViTHybridModel"),d(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(re,"href","#transformers.ViTHybridModel"),d(U,"class","relative group"),d(Ee,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Ee,"rel","nofollow"),d(to,"href","/docs/transformers/v4.29.0/en/model_doc/vit_hybrid#transformers.ViTHybridModel"),d(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ne,"id","transformers.ViTHybridForImageClassification"),d(ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ne,"href","#transformers.ViTHybridForImageClassification"),d(G,"class","relative group"),d(Fe,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Fe,"rel","nofollow"),d(ro,"href","/docs/transformers/v4.29.0/en/model_doc/vit_hybrid#transformers.ViTHybridForImageClassification"),d(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,c){o(document.head,p),f(e,y,c),f(e,_,c),o(_,g),o(g,b),w(l,b,null),o(_,u),o(_,E),o(E,ct),f(e,jo,c),f(e,D,c),o(D,X),o(X,po),w(fe,po,null),o(D,mt),o(D,fo),o(fo,ht),f(e,No,c),f(e,P,c),o(P,pt),o(P,ge),o(ge,ft),o(P,gt),o(P,Le),o(Le,ut),o(P,_t),o(P,We),o(We,bt),o(P,yt),f(e,Fo,c),f(e,Ue,c),o(Ue,vt),f(e,Do,c),f(e,Be,c),o(Be,go),o(go,Tt),f(e,qo,c),f(e,j,c),o(j,wt),o(j,ue),o(ue,$t),o(j,Vt),o(j,_e),o(_e,Ht),o(j,It),f(e,So,c),f(e,q,c),o(q,K),o(K,uo),w(be,uo,null),o(q,kt),o(q,_o),o(_o,xt),f(e,Oo,c),f(e,Ge,c),o(Ge,Pt),f(e,Ro,c),w(ye,e,c),f(e,Lo,c),f(e,Y,c),o(Y,N),o(N,Je),o(Je,Ct),o(N,zt),o(N,ve),o(ve,Et),o(N,At),o(N,Te),o(Te,Mt),o(N,jt),o(Y,Nt),o(Y,Xe),o(Xe,Ft),o(Xe,Ke),o(Ke,Dt),f(e,Wo,c),f(e,Ye,c),o(Ye,qt),f(e,Uo,c),f(e,S,c),o(S,Z),o(Z,bo),w(we,bo,null),o(S,St),o(S,yo),o(yo,Ot),f(e,Bo,c),f(e,I,c),w($e,I,null),o(I,Rt),o(I,O),o(O,Lt),o(O,Ze),o(Ze,Wt),o(O,Ut),o(O,Ve),o(Ve,Bt),o(O,Gt),o(I,Jt),o(I,R),o(R,Xt),o(R,Qe),o(Qe,Kt),o(R,Yt),o(R,eo),o(eo,Zt),o(R,Qt),o(I,er),w(Q,I,null),o(I,or),o(I,ee),w(He,ee,null),o(ee,tr),o(ee,L),o(L,rr),o(L,oo),o(oo,ar),o(L,sr),o(L,vo),o(vo,nr),o(L,ir),f(e,Go,c),f(e,W,c),o(W,oe),o(oe,To),w(Ie,To,null),o(W,lr),o(W,wo),o(wo,dr),f(e,Jo,c),f(e,A,c),w(ke,A,null),o(A,cr),o(A,$o),o($o,mr),o(A,hr),o(A,te),w(xe,te,null),o(te,pr),o(te,Vo),o(Vo,fr),f(e,Xo,c),f(e,U,c),o(U,re),o(re,Ho),w(Pe,Ho,null),o(U,gr),o(U,Io),o(Io,ur),f(e,Ko,c),f(e,M,c),w(Ce,M,null),o(M,_r),o(M,ze),o(ze,br),o(ze,Ee),o(Ee,yr),o(ze,vr),o(M,Tr),o(M,C),w(Ae,C,null),o(C,wr),o(C,B),o(B,$r),o(B,to),o(to,Vr),o(B,Hr),o(B,ko),o(ko,Ir),o(B,kr),o(C,xr),w(ae,C,null),o(C,Pr),w(se,C,null),f(e,Yo,c),f(e,G,c),o(G,ne),o(ne,xo),w(Me,xo,null),o(G,Cr),o(G,Po),o(Po,zr),f(e,Zo,c),f(e,k,c),w(je,k,null),o(k,Er),o(k,Co),o(Co,Ar),o(k,Mr),o(k,Ne),o(Ne,jr),o(Ne,Fe),o(Fe,Nr),o(Ne,Fr),o(k,Dr),o(k,z),w(De,z,null),o(z,qr),o(z,J),o(J,Sr),o(J,ro),o(ro,Or),o(J,Rr),o(J,zo),o(zo,Lr),o(J,Wr),o(z,Ur),w(ie,z,null),o(z,Br),w(le,z,null),Qo=!0},p(e,[c]){const qe={};c&2&&(qe.$$scope={dirty:c,ctx:e}),Q.$set(qe);const Eo={};c&2&&(Eo.$$scope={dirty:c,ctx:e}),ae.$set(Eo);const Ao={};c&2&&(Ao.$$scope={dirty:c,ctx:e}),se.$set(Ao);const Mo={};c&2&&(Mo.$$scope={dirty:c,ctx:e}),ie.$set(Mo);const Se={};c&2&&(Se.$$scope={dirty:c,ctx:e}),le.$set(Se)},i(e){Qo||($(l.$$.fragment,e),$(fe.$$.fragment,e),$(be.$$.fragment,e),$(ye.$$.fragment,e),$(we.$$.fragment,e),$($e.$$.fragment,e),$(Q.$$.fragment,e),$(He.$$.fragment,e),$(Ie.$$.fragment,e),$(ke.$$.fragment,e),$(xe.$$.fragment,e),$(Pe.$$.fragment,e),$(Ce.$$.fragment,e),$(Ae.$$.fragment,e),$(ae.$$.fragment,e),$(se.$$.fragment,e),$(Me.$$.fragment,e),$(je.$$.fragment,e),$(De.$$.fragment,e),$(ie.$$.fragment,e),$(le.$$.fragment,e),Qo=!0)},o(e){V(l.$$.fragment,e),V(fe.$$.fragment,e),V(be.$$.fragment,e),V(ye.$$.fragment,e),V(we.$$.fragment,e),V($e.$$.fragment,e),V(Q.$$.fragment,e),V(He.$$.fragment,e),V(Ie.$$.fragment,e),V(ke.$$.fragment,e),V(xe.$$.fragment,e),V(Pe.$$.fragment,e),V(Ce.$$.fragment,e),V(Ae.$$.fragment,e),V(ae.$$.fragment,e),V(se.$$.fragment,e),V(Me.$$.fragment,e),V(je.$$.fragment,e),V(De.$$.fragment,e),V(ie.$$.fragment,e),V(le.$$.fragment,e),Qo=!1},d(e){t(p),e&&t(y),e&&t(_),H(l),e&&t(jo),e&&t(D),H(fe),e&&t(No),e&&t(P),e&&t(Fo),e&&t(Ue),e&&t(Do),e&&t(Be),e&&t(qo),e&&t(j),e&&t(So),e&&t(q),H(be),e&&t(Oo),e&&t(Ge),e&&t(Ro),H(ye,e),e&&t(Lo),e&&t(Y),e&&t(Wo),e&&t(Ye),e&&t(Uo),e&&t(S),H(we),e&&t(Bo),e&&t(I),H($e),H(Q),H(He),e&&t(Go),e&&t(W),H(Ie),e&&t(Jo),e&&t(A),H(ke),H(xe),e&&t(Xo),e&&t(U),H(Pe),e&&t(Ko),e&&t(M),H(Ce),H(Ae),H(ae),H(se),e&&t(Yo),e&&t(G),H(Me),e&&t(Zo),e&&t(k),H(je),H(De),H(ie),H(le)}}}const rs={local:"hybrid-vision-transformer-vit-hybrid",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.ViTHybridConfig",title:"ViTHybridConfig"},{local:"transformers.ViTHybridImageProcessor",title:"ViTHybridImageProcessor"},{local:"transformers.ViTHybridModel",title:"ViTHybridModel"},{local:"transformers.ViTHybridForImageClassification",title:"ViTHybridForImageClassification"}],title:"Hybrid Vision Transformer (ViT Hybrid)"};function as(x){return Xa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class hs extends Ua{constructor(p){super();Ba(this,p,as,ts,Ga,{})}}export{hs as default,rs as metadata};
