import{s as Yt,o as Xt,n as ze}from"../chunks/scheduler.25b97de1.js";import{S as At,i as Qt,g as l,s as r,r as f,A as Ot,h as c,f as o,c as s,j as F,u as h,x as y,k as U,y as p,a,v as g,d as u,t as b,w as _}from"../chunks/index.d9030fc9.js";import{T as Ct}from"../chunks/Tip.baa67368.js";import{D as ve}from"../chunks/Docstring.ffac8efa.js";import{C as it}from"../chunks/CodeBlock.e6cd0d95.js";import{E as Ht}from"../chunks/ExampleCodeBlock.22dfe688.js";import{P as Kt}from"../chunks/PipelineTag.5f100392.js";import{H as G,E as eo}from"../chunks/EditOnGithub.91d95064.js";function to($){let n,T=`This model is in maintenance mode only, we don’t accept any new PRs changing its code.
If you run into any issues running this model, please reinstall the last version that supported this model: v4.40.2.
You can do so by running the following command: <code>pip install -U transformers==4.40.2</code>.`;return{c(){n=l("p"),n.innerHTML=T},l(d){n=c(d,"P",{"data-svelte-h":!0}),y(n)!=="svelte-1sq0hrb"&&(n.innerHTML=T)},m(d,m){a(d,n,m)},p:ze,d(d){d&&o(n)}}}function oo($){let n,T="Example:",d,m,v;return m=new it({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpVEh5YnJpZENvbmZpZyUyQyUyMFZpVEh5YnJpZE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFZpVCUyMEh5YnJpZCUyMHZpdC1oeWJyaWQtYmFzZS1iaXQtMzg0JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFZpVEh5YnJpZENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjB2aXQtaHlicmlkLWJhc2UtYml0LTM4NCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwVmlUSHlicmlkTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",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`,wrap:!1}}),{c(){n=l("p"),n.textContent=T,d=r(),f(m.$$.fragment)},l(i){n=c(i,"P",{"data-svelte-h":!0}),y(n)!=="svelte-11lpom8"&&(n.textContent=T),d=s(i),h(m.$$.fragment,i)},m(i,w){a(i,n,w),a(i,d,w),g(m,i,w),v=!0},p:ze,i(i){v||(u(m.$$.fragment,i),v=!0)},o(i){b(m.$$.fragment,i),v=!1},d(i){i&&(o(n),o(d)),_(m,i)}}}function no($){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=l("p"),n.innerHTML=T},l(d){n=c(d,"P",{"data-svelte-h":!0}),y(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(d,m){a(d,n,m)},p:ze,d(d){d&&o(n)}}}function ao($){let n,T="Example:",d,m,v;return m=new it({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFZpVEh5YnJpZE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ2aXQtaHlicmlkLWJhc2UtYml0LTM4NCUyMiklMEFtb2RlbCUyMCUzRCUyMFZpVEh5YnJpZE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ2aXQtaHlicmlkLWJhc2UtYml0LTM4NCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",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>, trust_remote_code=<span class="hljs-literal">True</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>]`,wrap:!1}}),{c(){n=l("p"),n.textContent=T,d=r(),f(m.$$.fragment)},l(i){n=c(i,"P",{"data-svelte-h":!0}),y(n)!=="svelte-11lpom8"&&(n.textContent=T),d=s(i),h(m.$$.fragment,i)},m(i,w){a(i,n,w),a(i,d,w),g(m,i,w),v=!0},p:ze,i(i){v||(u(m.$$.fragment,i),v=!0)},o(i){b(m.$$.fragment,i),v=!1},d(i){i&&(o(n),o(d)),_(m,i)}}}function ro($){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=l("p"),n.innerHTML=T},l(d){n=c(d,"P",{"data-svelte-h":!0}),y(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(d,m){a(d,n,m)},p:ze,d(d){d&&o(n)}}}function so($){let n,T="Example:",d,m,v;return m=new it({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFZpVEh5YnJpZEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnZpdC1oeWJyaWQtYmFzZS1iaXQtMzg0JTIyKSUwQW1vZGVsJTIwJTNEJTIwVmlUSHlicmlkRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdml0LWh5YnJpZC1iYXNlLWJpdC0zODQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",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>, trust_remote_code=<span class="hljs-literal">True</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`,wrap:!1}}),{c(){n=l("p"),n.textContent=T,d=r(),f(m.$$.fragment)},l(i){n=c(i,"P",{"data-svelte-h":!0}),y(n)!=="svelte-11lpom8"&&(n.textContent=T),d=s(i),h(m.$$.fragment,i)},m(i,w){a(i,n,w),a(i,d,w),g(m,i,w),v=!0},p:ze,i(i){v||(u(m.$$.fragment,i),v=!0)},o(i){b(m.$$.fragment,i),v=!1},d(i){i&&(o(n),o(d)),_(m,i)}}}function io($){let n,T,d,m,v,i,w,Je,S,Ze,q,Vt=`The hybrid Vision Transformer (ViT) model was proposed in <a href="https://arxiv.org/abs/2010.11929" rel="nofollow">An Image is Worth 16x16 Words: Transformers for Image Recognition
at Scale</a> 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’s 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 <a href="vit">plain Vision Transformer</a>,
by leveraging a convolutional backbone (specifically, <a href="bit">BiT</a>) whose features are used as initial “tokens” for the Transformer.`,Fe,D,It="The abstract from the paper is the following:",Ue,Y,xt=`<em>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.</em>`,We,X,kt=`This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>. The original code (written in JAX) can be
found <a href="https://github.com/google-research/vision_transformer" rel="nofollow">here</a>.`,Ne,A,Pe,Q,zt=`PyTorch includes a native scaled dot-product attention (SDPA) operator as part of <code>torch.nn.functional</code>. This function
encompasses several implementations that can be applied depending on the inputs and the hardware in use. See the
<a href="https://pytorch.org/docs/stable/generated/torch.nn.functional.scaled_dot_product_attention.html" rel="nofollow">official documentation</a>
or the <a href="https://huggingface.co/docs/transformers/main/en/perf_infer_gpu_one#pytorch-scaled-dot-product-attention" rel="nofollow">GPU Inference</a>
page for more information.`,Re,O,jt=`SDPA is used by default for <code>torch&gt;=2.1.1</code> when an implementation is available, but you may also set
<code>attn_implementation=&quot;sdpa&quot;</code> in <code>from_pretrained()</code> to explicitly request SDPA to be used.`,Ee,K,Be,ee,Jt="For the best speedups, we recommend loading the model in half-precision (e.g. <code>torch.float16</code> or <code>torch.bfloat16</code>).",Le,te,Zt="On a local benchmark (A100-40GB, PyTorch 2.3.0, OS Ubuntu 22.04) with <code>float32</code> and <code>google/vit-hybrid-base-bit-384</code> model, we saw the following speedups during inference.",Ge,oe,Ft="<thead><tr><th>Batch size</th> <th>Average inference time (ms), eager mode</th> <th>Average inference time (ms), sdpa model</th> <th>Speed up, Sdpa / Eager (x)</th></tr></thead> <tbody><tr><td>1</td> <td>29</td> <td>18</td> <td>1.61</td></tr> <tr><td>2</td> <td>26</td> <td>18</td> <td>1.44</td></tr> <tr><td>4</td> <td>25</td> <td>18</td> <td>1.39</td></tr> <tr><td>8</td> <td>34</td> <td>24</td> <td>1.42</td></tr></tbody>",Se,ne,qe,ae,Ut="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ViT Hybrid.",De,re,Ye,se,Wt='<li><a href="/docs/transformers/main/en/model_doc/vit_hybrid#transformers.ViTHybridForImageClassification">ViTHybridForImageClassification</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification" rel="nofollow">example script</a> and <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb" rel="nofollow">notebook</a>.</li> <li>See also: <a href="../tasks/image_classification">Image classification task guide</a></li>',Xe,ie,Nt="If you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.",Ae,de,Qe,M,le,dt,we,Pt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/vit_hybrid#transformers.ViTHybridModel">ViTHybridModel</a>. 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
<a href="https://huggingface.co/google/vit-hybrid-base-bit-384" rel="nofollow">google/vit-hybrid-base-bit-384</a> architecture.`,lt,$e,Rt=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ct,W,Oe,ce,Ke,I,me,mt,Me,Et="Constructs a ViT Hybrid image processor.",pt,N,pe,ft,Ce,Bt="Preprocess an image or batch of images.",et,fe,tt,x,he,ht,He,Lt=`The bare ViT Hybrid Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,gt,H,ge,ut,Ve,Gt='The <a href="/docs/transformers/main/en/model_doc/vit_hybrid#transformers.ViTHybridModel">ViTHybridModel</a> forward method, overrides the <code>__call__</code> special method.',bt,P,_t,R,ot,ue,nt,C,be,yt,Ie,St=`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.`,Tt,xe,qt=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,vt,V,_e,wt,ke,Dt='The <a href="/docs/transformers/main/en/model_doc/vit_hybrid#transformers.ViTHybridForImageClassification">ViTHybridForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',$t,E,Mt,B,at,ye,rt,je,st;return v=new G({props:{title:"Hybrid Vision Transformer (ViT Hybrid)",local:"hybrid-vision-transformer-vit-hybrid",headingTag:"h1"}}),w=new Ct({props:{warning:!0,$$slots:{default:[to]},$$scope:{ctx:$}}}),S=new G({props:{title:"Overview",local:"overview",headingTag:"h2"}}),A=new G({props:{title:"Using Scaled Dot Product Attention (SDPA)",local:"using-scaled-dot-product-attention-sdpa",headingTag:"h2"}}),K=new it({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpVEh5YnJpZEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFtb2RlbCUyMCUzRCUyMFZpVEh5YnJpZEZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnZpdC1oeWJyaWQtYmFzZS1iaXQtMzg0JTIyJTJDJTIwYXR0bl9pbXBsZW1lbnRhdGlvbiUzRCUyMnNkcGElMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBLi4u",highlighted:`from transformers import ViTHybridForImageClassification
model = <span class="hljs-module-access"><span class="hljs-module"><span class="hljs-identifier">ViTHybridForImageClassification</span>.</span></span>from<span class="hljs-constructor">_pretrained(<span class="hljs-string">&quot;google/vit-hybrid-base-bit-384&quot;</span>, <span class="hljs-params">attn_implementation</span>=<span class="hljs-string">&quot;sdpa&quot;</span>, <span class="hljs-params">torch_dtype</span>=<span class="hljs-params">torch</span>.<span class="hljs-params">float16</span>)</span>
...`,wrap:!1}}),ne=new G({props:{title:"Resources",local:"resources",headingTag:"h2"}}),re=new Kt({props:{pipeline:"image-classification"}}),de=new G({props:{title:"ViTHybridConfig",local:"transformers.ViTHybridConfig",headingTag:"h2"}}),le=new ve({props:{name:"class transformers.ViTHybridConfig",anchor:"transformers.ViTHybridConfig",parameters:[{name:"backbone_config",val:" = None"},{name:"backbone",val:" = None"},{name:"use_pretrained_backbone",val:" = False"},{name:"use_timm_backbone",val:" = False"},{name:"backbone_kwargs",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.backbone_config",description:`<strong>backbone_config</strong> (<code>Union[Dict[str, Any], PretrainedConfig]</code>, <em>optional</em>) &#x2014;
The configuration of the backbone in a dictionary or the config object of the backbone.`,name:"backbone_config"},{anchor:"transformers.ViTHybridConfig.backbone",description:`<strong>backbone</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Name of backbone to use when <code>backbone_config</code> is <code>None</code>. If <code>use_pretrained_backbone</code> is <code>True</code>, this
will load the corresponding pretrained weights from the timm or transformers library. If <code>use_pretrained_backbone</code>
is <code>False</code>, this loads the backbone&#x2019;s config and uses that to initialize the backbone with random weights.`,name:"backbone"},{anchor:"transformers.ViTHybridConfig.use_pretrained_backbone",description:`<strong>use_pretrained_backbone</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use pretrained weights for the backbone.`,name:"use_pretrained_backbone"},{anchor:"transformers.ViTHybridConfig.use_timm_backbone",description:`<strong>use_timm_backbone</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to load <code>backbone</code> from the timm library. If <code>False</code>, the backbone is loaded from the transformers
library.`,name:"use_timm_backbone"},{anchor:"transformers.ViTHybridConfig.backbone_kwargs",description:`<strong>backbone_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Keyword arguments to be passed to AutoBackbone when loading from a checkpoint
e.g. <code>{&apos;out_indices&apos;: (0, 1, 2, 3)}</code>. Cannot be specified if <code>backbone_config</code> is set.`,name:"backbone_kwargs"},{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.0) &#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.0) &#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.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"},{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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deprecated/vit_hybrid/configuration_vit_hybrid.py#L26"}}),W=new Ht({props:{anchor:"transformers.ViTHybridConfig.example",$$slots:{default:[oo]},$$scope:{ctx:$}}}),ce=new G({props:{title:"ViTHybridImageProcessor",local:"transformers.ViTHybridImageProcessor",headingTag:"h2"}}),me=new ve({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.`,name:"rescale_factor"},{anchor:"transformers.ViTHybridImageProcessor.do_normalize",description:`<strong>do_normalize</strong> &#x2014;
Whether to normalize the image. Can be overridden by <code>do_normalize</code> in the <code>preprocess</code> method.`,name:"do_normalize"},{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;
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.
Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,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;
Whether to convert the image to RGB.`,name:"do_convert_rgb"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deprecated/vit_hybrid/image_processing_vit_hybrid.py#L52"}}),pe=new ve({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:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ViTHybridImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,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"},{anchor:"transformers.ViTHybridImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/deprecated/vit_hybrid/image_processing_vit_hybrid.py#L192"}}),fe=new G({props:{title:"ViTHybridModel",local:"transformers.ViTHybridModel",headingTag:"h2"}}),he=new ve({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/main/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/main/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/main/src/transformers/models/deprecated/vit_hybrid/modeling_vit_hybrid.py#L561"}}),ge=new ve({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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__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/main/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/main/src/transformers/models/deprecated/vit_hybrid/modeling_vit_hybrid.py#L590",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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/main/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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),P=new Ct({props:{$$slots:{default:[no]},$$scope:{ctx:$}}}),R=new Ht({props:{anchor:"transformers.ViTHybridModel.forward.example",$$slots:{default:[ao]},$$scope:{ctx:$}}}),ue=new G({props:{title:"ViTHybridForImageClassification",local:"transformers.ViTHybridForImageClassification",headingTag:"h2"}}),be=new ve({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/main/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/main/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/main/src/transformers/models/deprecated/vit_hybrid/modeling_vit_hybrid.py#L675"}}),_e=new ve({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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__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/main/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/main/src/transformers/models/deprecated/vit_hybrid/modeling_vit_hybrid.py#L695",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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/main/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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),E=new Ct({props:{$$slots:{default:[ro]},$$scope:{ctx:$}}}),B=new Ht({props:{anchor:"transformers.ViTHybridForImageClassification.forward.example",$$slots:{default:[so]},$$scope:{ctx:$}}}),ye=new eo({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/vit_hybrid.md"}}),{c(){n=l("meta"),T=r(),d=l("p"),m=r(),f(v.$$.fragment),i=r(),f(w.$$.fragment),Je=r(),f(S.$$.fragment),Ze=r(),q=l("p"),q.innerHTML=Vt,Fe=r(),D=l("p"),D.textContent=It,Ue=r(),Y=l("p"),Y.innerHTML=xt,We=r(),X=l("p"),X.innerHTML=kt,Ne=r(),f(A.$$.fragment),Pe=r(),Q=l("p"),Q.innerHTML=zt,Re=r(),O=l("p"),O.innerHTML=jt,Ee=r(),f(K.$$.fragment),Be=r(),ee=l("p"),ee.innerHTML=Jt,Le=r(),te=l("p"),te.innerHTML=Zt,Ge=r(),oe=l("table"),oe.innerHTML=Ft,Se=r(),f(ne.$$.fragment),qe=r(),ae=l("p"),ae.textContent=Ut,De=r(),f(re.$$.fragment),Ye=r(),se=l("ul"),se.innerHTML=Wt,Xe=r(),ie=l("p"),ie.textContent=Nt,Ae=r(),f(de.$$.fragment),Qe=r(),M=l("div"),f(le.$$.fragment),dt=r(),we=l("p"),we.innerHTML=Pt,lt=r(),$e=l("p"),$e.innerHTML=Rt,ct=r(),f(W.$$.fragment),Oe=r(),f(ce.$$.fragment),Ke=r(),I=l("div"),f(me.$$.fragment),mt=r(),Me=l("p"),Me.textContent=Et,pt=r(),N=l("div"),f(pe.$$.fragment),ft=r(),Ce=l("p"),Ce.textContent=Bt,et=r(),f(fe.$$.fragment),tt=r(),x=l("div"),f(he.$$.fragment),ht=r(),He=l("p"),He.innerHTML=Lt,gt=r(),H=l("div"),f(ge.$$.fragment),ut=r(),Ve=l("p"),Ve.innerHTML=Gt,bt=r(),f(P.$$.fragment),_t=r(),f(R.$$.fragment),ot=r(),f(ue.$$.fragment),nt=r(),C=l("div"),f(be.$$.fragment),yt=r(),Ie=l("p"),Ie.textContent=St,Tt=r(),xe=l("p"),xe.innerHTML=qt,vt=r(),V=l("div"),f(_e.$$.fragment),wt=r(),ke=l("p"),ke.innerHTML=Dt,$t=r(),f(E.$$.fragment),Mt=r(),f(B.$$.fragment),at=r(),f(ye.$$.fragment),rt=r(),je=l("p"),this.h()},l(e){const t=Ot("svelte-u9bgzb",document.head);n=c(t,"META",{name:!0,content:!0}),t.forEach(o),T=s(e),d=c(e,"P",{}),F(d).forEach(o),m=s(e),h(v.$$.fragment,e),i=s(e),h(w.$$.fragment,e),Je=s(e),h(S.$$.fragment,e),Ze=s(e),q=c(e,"P",{"data-svelte-h":!0}),y(q)!=="svelte-6697c1"&&(q.innerHTML=Vt),Fe=s(e),D=c(e,"P",{"data-svelte-h":!0}),y(D)!=="svelte-vfdo9a"&&(D.textContent=It),Ue=s(e),Y=c(e,"P",{"data-svelte-h":!0}),y(Y)!=="svelte-yjj3f8"&&(Y.innerHTML=xt),We=s(e),X=c(e,"P",{"data-svelte-h":!0}),y(X)!=="svelte-pwnwoc"&&(X.innerHTML=kt),Ne=s(e),h(A.$$.fragment,e),Pe=s(e),Q=c(e,"P",{"data-svelte-h":!0}),y(Q)!=="svelte-1cid2pe"&&(Q.innerHTML=zt),Re=s(e),O=c(e,"P",{"data-svelte-h":!0}),y(O)!=="svelte-1x11lxg"&&(O.innerHTML=jt),Ee=s(e),h(K.$$.fragment,e),Be=s(e),ee=c(e,"P",{"data-svelte-h":!0}),y(ee)!=="svelte-djb2w0"&&(ee.innerHTML=Jt),Le=s(e),te=c(e,"P",{"data-svelte-h":!0}),y(te)!=="svelte-eb6am5"&&(te.innerHTML=Zt),Ge=s(e),oe=c(e,"TABLE",{"data-svelte-h":!0}),y(oe)!=="svelte-1tmwgn6"&&(oe.innerHTML=Ft),Se=s(e),h(ne.$$.fragment,e),qe=s(e),ae=c(e,"P",{"data-svelte-h":!0}),y(ae)!=="svelte-rhht3g"&&(ae.textContent=Ut),De=s(e),h(re.$$.fragment,e),Ye=s(e),se=c(e,"UL",{"data-svelte-h":!0}),y(se)!=="svelte-y2ivb7"&&(se.innerHTML=Wt),Xe=s(e),ie=c(e,"P",{"data-svelte-h":!0}),y(ie)!=="svelte-1xesile"&&(ie.textContent=Nt),Ae=s(e),h(de.$$.fragment,e),Qe=s(e),M=c(e,"DIV",{class:!0});var k=F(M);h(le.$$.fragment,k),dt=s(k),we=c(k,"P",{"data-svelte-h":!0}),y(we)!=="svelte-nac9fv"&&(we.innerHTML=Pt),lt=s(k),$e=c(k,"P",{"data-svelte-h":!0}),y($e)!=="svelte-o55m63"&&($e.innerHTML=Rt),ct=s(k),h(W.$$.fragment,k),k.forEach(o),Oe=s(e),h(ce.$$.fragment,e),Ke=s(e),I=c(e,"DIV",{class:!0});var J=F(I);h(me.$$.fragment,J),mt=s(J),Me=c(J,"P",{"data-svelte-h":!0}),y(Me)!=="svelte-p40nh7"&&(Me.textContent=Et),pt=s(J),N=c(J,"DIV",{class:!0});var Te=F(N);h(pe.$$.fragment,Te),ft=s(Te),Ce=c(Te,"P",{"data-svelte-h":!0}),y(Ce)!=="svelte-1x3yxsa"&&(Ce.textContent=Bt),Te.forEach(o),J.forEach(o),et=s(e),h(fe.$$.fragment,e),tt=s(e),x=c(e,"DIV",{class:!0});var Z=F(x);h(he.$$.fragment,Z),ht=s(Z),He=c(Z,"P",{"data-svelte-h":!0}),y(He)!=="svelte-9dwrv6"&&(He.innerHTML=Lt),gt=s(Z),H=c(Z,"DIV",{class:!0});var z=F(H);h(ge.$$.fragment,z),ut=s(z),Ve=c(z,"P",{"data-svelte-h":!0}),y(Ve)!=="svelte-13rm629"&&(Ve.innerHTML=Gt),bt=s(z),h(P.$$.fragment,z),_t=s(z),h(R.$$.fragment,z),z.forEach(o),Z.forEach(o),ot=s(e),h(ue.$$.fragment,e),nt=s(e),C=c(e,"DIV",{class:!0});var j=F(C);h(be.$$.fragment,j),yt=s(j),Ie=c(j,"P",{"data-svelte-h":!0}),y(Ie)!=="svelte-hvti62"&&(Ie.textContent=St),Tt=s(j),xe=c(j,"P",{"data-svelte-h":!0}),y(xe)!=="svelte-1gjh92c"&&(xe.innerHTML=qt),vt=s(j),V=c(j,"DIV",{class:!0});var L=F(V);h(_e.$$.fragment,L),wt=s(L),ke=c(L,"P",{"data-svelte-h":!0}),y(ke)!=="svelte-1k2mfd9"&&(ke.innerHTML=Dt),$t=s(L),h(E.$$.fragment,L),Mt=s(L),h(B.$$.fragment,L),L.forEach(o),j.forEach(o),at=s(e),h(ye.$$.fragment,e),rt=s(e),je=c(e,"P",{}),F(je).forEach(o),this.h()},h(){U(n,"name","hf:doc:metadata"),U(n,"content",lo),U(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(C,"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,t){p(document.head,n),a(e,T,t),a(e,d,t),a(e,m,t),g(v,e,t),a(e,i,t),g(w,e,t),a(e,Je,t),g(S,e,t),a(e,Ze,t),a(e,q,t),a(e,Fe,t),a(e,D,t),a(e,Ue,t),a(e,Y,t),a(e,We,t),a(e,X,t),a(e,Ne,t),g(A,e,t),a(e,Pe,t),a(e,Q,t),a(e,Re,t),a(e,O,t),a(e,Ee,t),g(K,e,t),a(e,Be,t),a(e,ee,t),a(e,Le,t),a(e,te,t),a(e,Ge,t),a(e,oe,t),a(e,Se,t),g(ne,e,t),a(e,qe,t),a(e,ae,t),a(e,De,t),g(re,e,t),a(e,Ye,t),a(e,se,t),a(e,Xe,t),a(e,ie,t),a(e,Ae,t),g(de,e,t),a(e,Qe,t),a(e,M,t),g(le,M,null),p(M,dt),p(M,we),p(M,lt),p(M,$e),p(M,ct),g(W,M,null),a(e,Oe,t),g(ce,e,t),a(e,Ke,t),a(e,I,t),g(me,I,null),p(I,mt),p(I,Me),p(I,pt),p(I,N),g(pe,N,null),p(N,ft),p(N,Ce),a(e,et,t),g(fe,e,t),a(e,tt,t),a(e,x,t),g(he,x,null),p(x,ht),p(x,He),p(x,gt),p(x,H),g(ge,H,null),p(H,ut),p(H,Ve),p(H,bt),g(P,H,null),p(H,_t),g(R,H,null),a(e,ot,t),g(ue,e,t),a(e,nt,t),a(e,C,t),g(be,C,null),p(C,yt),p(C,Ie),p(C,Tt),p(C,xe),p(C,vt),p(C,V),g(_e,V,null),p(V,wt),p(V,ke),p(V,$t),g(E,V,null),p(V,Mt),g(B,V,null),a(e,at,t),g(ye,e,t),a(e,rt,t),a(e,je,t),st=!0},p(e,[t]){const k={};t&2&&(k.$$scope={dirty:t,ctx:e}),w.$set(k);const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),W.$set(J);const Te={};t&2&&(Te.$$scope={dirty:t,ctx:e}),P.$set(Te);const Z={};t&2&&(Z.$$scope={dirty:t,ctx:e}),R.$set(Z);const z={};t&2&&(z.$$scope={dirty:t,ctx:e}),E.$set(z);const j={};t&2&&(j.$$scope={dirty:t,ctx:e}),B.$set(j)},i(e){st||(u(v.$$.fragment,e),u(w.$$.fragment,e),u(S.$$.fragment,e),u(A.$$.fragment,e),u(K.$$.fragment,e),u(ne.$$.fragment,e),u(re.$$.fragment,e),u(de.$$.fragment,e),u(le.$$.fragment,e),u(W.$$.fragment,e),u(ce.$$.fragment,e),u(me.$$.fragment,e),u(pe.$$.fragment,e),u(fe.$$.fragment,e),u(he.$$.fragment,e),u(ge.$$.fragment,e),u(P.$$.fragment,e),u(R.$$.fragment,e),u(ue.$$.fragment,e),u(be.$$.fragment,e),u(_e.$$.fragment,e),u(E.$$.fragment,e),u(B.$$.fragment,e),u(ye.$$.fragment,e),st=!0)},o(e){b(v.$$.fragment,e),b(w.$$.fragment,e),b(S.$$.fragment,e),b(A.$$.fragment,e),b(K.$$.fragment,e),b(ne.$$.fragment,e),b(re.$$.fragment,e),b(de.$$.fragment,e),b(le.$$.fragment,e),b(W.$$.fragment,e),b(ce.$$.fragment,e),b(me.$$.fragment,e),b(pe.$$.fragment,e),b(fe.$$.fragment,e),b(he.$$.fragment,e),b(ge.$$.fragment,e),b(P.$$.fragment,e),b(R.$$.fragment,e),b(ue.$$.fragment,e),b(be.$$.fragment,e),b(_e.$$.fragment,e),b(E.$$.fragment,e),b(B.$$.fragment,e),b(ye.$$.fragment,e),st=!1},d(e){e&&(o(T),o(d),o(m),o(i),o(Je),o(Ze),o(q),o(Fe),o(D),o(Ue),o(Y),o(We),o(X),o(Ne),o(Pe),o(Q),o(Re),o(O),o(Ee),o(Be),o(ee),o(Le),o(te),o(Ge),o(oe),o(Se),o(qe),o(ae),o(De),o(Ye),o(se),o(Xe),o(ie),o(Ae),o(Qe),o(M),o(Oe),o(Ke),o(I),o(et),o(tt),o(x),o(ot),o(nt),o(C),o(at),o(rt),o(je)),o(n),_(v,e),_(w,e),_(S,e),_(A,e),_(K,e),_(ne,e),_(re,e),_(de,e),_(le),_(W),_(ce,e),_(me),_(pe),_(fe,e),_(he),_(ge),_(P),_(R),_(ue,e),_(be),_(_e),_(E),_(B),_(ye,e)}}}const lo='{"title":"Hybrid Vision Transformer (ViT Hybrid)","local":"hybrid-vision-transformer-vit-hybrid","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Using Scaled Dot Product Attention (SDPA)","local":"using-scaled-dot-product-attention-sdpa","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"ViTHybridConfig","local":"transformers.ViTHybridConfig","sections":[],"depth":2},{"title":"ViTHybridImageProcessor","local":"transformers.ViTHybridImageProcessor","sections":[],"depth":2},{"title":"ViTHybridModel","local":"transformers.ViTHybridModel","sections":[],"depth":2},{"title":"ViTHybridForImageClassification","local":"transformers.ViTHybridForImageClassification","sections":[],"depth":2}],"depth":1}';function co($){return Xt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class yo extends At{constructor(n){super(),Qt(this,n,co,io,Yt,{})}}export{yo as component};
