import{S as Ca,i as Ea,s as za,e as r,k as p,w as v,t as s,M as xa,c as a,d as t,m as h,a as n,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 M,v as ja,L as Nr}from"../../chunks/vendor-hf-doc-builder.js";import{T as ka}from"../../chunks/Tip-hf-doc-builder.js";import{D as We}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Pr}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ze}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Jr}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as Ja}from"../../chunks/PipelineTag-hf-doc-builder.js";function Na(k){let m,y,b,g,_;return g=new Pr({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`}}),{c(){m=r("p"),y=s("Example:"),b=p(),v(g.$$.fragment)},l(l){m=a(l,"P",{});var u=n(m);y=i(u,"Example:"),u.forEach(t),b=h(l),T(g.$$.fragment,l)},m(l,u){f(l,m,u),o(m,y),f(l,b,u),w(g,l,u),_=!0},p:Nr,i(l){_||($(g.$$.fragment,l),_=!0)},o(l){V(g.$$.fragment,l),_=!1},d(l){l&&t(m),l&&t(b),M(g,l)}}}function Pa(k){let m,y,b,g,_;return{c(){m=r("p"),y=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),b=r("code"),g=s("Module"),_=s(`
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){m=a(l,"P",{});var u=n(m);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),b=a(u,"CODE",{});var x=n(b);g=i(x,"Module"),x.forEach(t),_=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,m,u),o(m,y),o(m,b),o(b,g),o(m,_)},d(l){l&&t(m)}}}function Fa(k){let m,y,b,g,_;return g=new Pr({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFZpVEh5YnJpZE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ2aXQtaHlicmlkLWJhc2UtYml0LTM4NCUyMiklMEFtb2RlbCUyMCUzRCUyMFZpVEh5YnJpZE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ2aXQtaHlicmlkLWJhc2UtYml0LTM4NCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",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(){m=r("p"),y=s("Example:"),b=p(),v(g.$$.fragment)},l(l){m=a(l,"P",{});var u=n(m);y=i(u,"Example:"),u.forEach(t),b=h(l),T(g.$$.fragment,l)},m(l,u){f(l,m,u),o(m,y),f(l,b,u),w(g,l,u),_=!0},p:Nr,i(l){_||($(g.$$.fragment,l),_=!0)},o(l){V(g.$$.fragment,l),_=!1},d(l){l&&t(m),l&&t(b),M(g,l)}}}function Wa(k){let m,y,b,g,_;return{c(){m=r("p"),y=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),b=r("code"),g=s("Module"),_=s(`
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){m=a(l,"P",{});var u=n(m);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),b=a(u,"CODE",{});var x=n(b);g=i(x,"Module"),x.forEach(t),_=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,m,u),o(m,y),o(m,b),o(b,g),o(m,_)},d(l){l&&t(m)}}}function Za(k){let m,y,b,g,_;return g=new Pr({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFZpVEh5YnJpZEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnZpdC1oeWJyaWQtYmFzZS1iaXQtMzg0JTIyKSUwQW1vZGVsJTIwJTNEJTIwVmlUSHlicmlkRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdml0LWh5YnJpZC1iYXNlLWJpdC0zODQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",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(){m=r("p"),y=s("Example:"),b=p(),v(g.$$.fragment)},l(l){m=a(l,"P",{});var u=n(m);y=i(u,"Example:"),u.forEach(t),b=h(l),T(g.$$.fragment,l)},m(l,u){f(l,m,u),o(m,y),f(l,b,u),w(g,l,u),_=!0},p:Nr,i(l){_||($(g.$$.fragment,l),_=!0)},o(l){V(g.$$.fragment,l),_=!1},d(l){l&&t(m),l&&t(b),M(g,l)}}}function Ua(k){let m,y,b,g,_,l,u,x,rt,Co,F,D,io,me,at,lo,nt,Eo,C,st,pe,it,lt,Ue,dt,ct,Ae,mt,pt,zo,Be,ht,xo,Re,co,ft,jo,N,gt,he,ut,bt,fe,_t,yt,Jo,W,Y,mo,ge,vt,po,Tt,No,Se,wt,Po,ue,Fo,L,P,Ge,$t,Vt,be,Mt,It,_e,Ht,kt,Ct,qe,Et,De,zt,Wo,Ye,xt,Zo,Z,X,ho,ye,jt,fo,Jt,Uo,I,ve,Nt,U,Pt,Le,Ft,Wt,Te,Zt,Ut,At,A,Bt,Xe,Rt,St,Qe,Gt,qt,Dt,Q,Ao,B,O,go,we,Yt,uo,Lt,Bo,j,$e,Xt,bo,Qt,Ot,K,Ve,Kt,_o,er,Ro,R,ee,yo,Me,or,vo,tr,So,J,Ie,rr,He,ar,ke,nr,sr,ir,E,Ce,lr,S,dr,Oe,cr,mr,To,pr,hr,fr,oe,gr,te,Go,G,re,wo,Ee,ur,$o,br,qo,H,ze,_r,Vo,yr,vr,xe,Tr,je,wr,$r,Vr,z,Je,Mr,q,Ir,Ke,Hr,kr,Mo,Cr,Er,zr,ae,xr,ne,Do;return l=new Ze({}),me=new Ze({}),ge=new Ze({}),ue=new Ja({props:{pipeline:"image-classification"}}),ye=new Ze({}),ve=new We({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/main/src/transformers/models/vit_hybrid/configuration_vit_hybrid.py#L32"}}),Q=new Jr({props:{anchor:"transformers.ViTHybridConfig.example",$$slots:{default:[Na]},$$scope:{ctx:k}}}),we=new Ze({}),$e=new We({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/main/src/transformers/models/vit_hybrid/image_processing_vit_hybrid.py#L48"}}),Ve=new We({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/main/src/transformers/models/vit_hybrid/image_processing_vit_hybrid.py#L150"}}),Me=new Ze({}),Ie=new We({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/vit_hybrid/modeling_vit_hybrid.py#L533"}}),Ce=new We({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/levit#transformers.LevitFeatureExtractor.__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/vit_hybrid/modeling_vit_hybrid.py#L558",returnDescription:`
<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>) \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/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),oe=new ka({props:{$$slots:{default:[Pa]},$$scope:{ctx:k}}}),te=new Jr({props:{anchor:"transformers.ViTHybridModel.forward.example",$$slots:{default:[Fa]},$$scope:{ctx:k}}}),Ee=new Ze({}),ze=new We({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/vit_hybrid/modeling_vit_hybrid.py#L652"}}),Je=new We({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/levit#transformers.LevitFeatureExtractor.__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/vit_hybrid/modeling_vit_hybrid.py#L665",returnDescription:`
<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) \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/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ae=new ka({props:{$$slots:{default:[Wa]},$$scope:{ctx:k}}}),ne=new Jr({props:{anchor:"transformers.ViTHybridForImageClassification.forward.example",$$slots:{default:[Za]},$$scope:{ctx:k}}}),{c(){m=r("meta"),y=p(),b=r("h1"),g=r("a"),_=r("span"),v(l.$$.fragment),u=p(),x=r("span"),rt=s("Hybrid Vision Transformer (ViT Hybrid)"),Co=p(),F=r("h2"),D=r("a"),io=r("span"),v(me.$$.fragment),at=p(),lo=r("span"),nt=s("Overview"),Eo=p(),C=r("p"),st=s("The hybrid Vision Transformer (ViT) model was proposed in "),pe=r("a"),it=s(`An Image is Worth 16x16 Words: Transformers for Image Recognition
at Scale`),lt=s(` 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 `),Ue=r("a"),dt=s("plain Vision Transformer"),ct=s(`,
by leveraging a convolutional backbone (specifically, `),Ae=r("a"),mt=s("BiT"),pt=s(") whose features are used as initial \u201Ctokens\u201D for the Transformer."),zo=p(),Be=r("p"),ht=s("The abstract from the paper is the following:"),xo=p(),Re=r("p"),co=r("em"),ft=s(`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.`),jo=p(),N=r("p"),gt=s("This model was contributed by "),he=r("a"),ut=s("nielsr"),bt=s(`. The original code (written in JAX) can be
found `),fe=r("a"),_t=s("here"),yt=s("."),Jo=p(),W=r("h2"),Y=r("a"),mo=r("span"),v(ge.$$.fragment),vt=p(),po=r("span"),Tt=s("Resources"),No=p(),Se=r("p"),wt=s("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with ViT Hybrid."),Po=p(),v(ue.$$.fragment),Fo=p(),L=r("ul"),P=r("li"),Ge=r("a"),$t=s("ViTHybridForImageClassification"),Vt=s(" is supported by this "),be=r("a"),Mt=s("example script"),It=s(" and "),_e=r("a"),Ht=s("notebook"),kt=s("."),Ct=p(),qe=r("li"),Et=s("See also: "),De=r("a"),zt=s("Image classification task guide"),Wo=p(),Ye=r("p"),xt=s("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."),Zo=p(),Z=r("h2"),X=r("a"),ho=r("span"),v(ye.$$.fragment),jt=p(),fo=r("span"),Jt=s("ViTHybridConfig"),Uo=p(),I=r("div"),v(ve.$$.fragment),Nt=p(),U=r("p"),Pt=s("This is the configuration class to store the configuration of a "),Le=r("a"),Ft=s("ViTHybridModel"),Wt=s(`. 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
`),Te=r("a"),Zt=s("google/vit-hybrid-base-bit-384"),Ut=s(" architecture."),At=p(),A=r("p"),Bt=s("Configuration objects inherit from "),Xe=r("a"),Rt=s("PretrainedConfig"),St=s(` and can be used to control the model outputs. Read the
documentation from `),Qe=r("a"),Gt=s("PretrainedConfig"),qt=s(" for more information."),Dt=p(),v(Q.$$.fragment),Ao=p(),B=r("h2"),O=r("a"),go=r("span"),v(we.$$.fragment),Yt=p(),uo=r("span"),Lt=s("ViTHybridImageProcessor"),Bo=p(),j=r("div"),v($e.$$.fragment),Xt=p(),bo=r("p"),Qt=s("Constructs a ViT Hybrid image processor."),Ot=p(),K=r("div"),v(Ve.$$.fragment),Kt=p(),_o=r("p"),er=s("Preprocess an image or batch of images."),Ro=p(),R=r("h2"),ee=r("a"),yo=r("span"),v(Me.$$.fragment),or=p(),vo=r("span"),tr=s("ViTHybridModel"),So=p(),J=r("div"),v(Ie.$$.fragment),rr=p(),He=r("p"),ar=s(`The bare ViT Hybrid Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ke=r("a"),nr=s("torch.nn.Module"),sr=s(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ir=p(),E=r("div"),v(Ce.$$.fragment),lr=p(),S=r("p"),dr=s("The "),Oe=r("a"),cr=s("ViTHybridModel"),mr=s(" forward method, overrides the "),To=r("code"),pr=s("__call__"),hr=s(" special method."),fr=p(),v(oe.$$.fragment),gr=p(),v(te.$$.fragment),Go=p(),G=r("h2"),re=r("a"),wo=r("span"),v(Ee.$$.fragment),ur=p(),$o=r("span"),br=s("ViTHybridForImageClassification"),qo=p(),H=r("div"),v(ze.$$.fragment),_r=p(),Vo=r("p"),yr=s(`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.`),vr=p(),xe=r("p"),Tr=s("This model is a PyTorch "),je=r("a"),wr=s("torch.nn.Module"),$r=s(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Vr=p(),z=r("div"),v(Je.$$.fragment),Mr=p(),q=r("p"),Ir=s("The "),Ke=r("a"),Hr=s("ViTHybridForImageClassification"),kr=s(" forward method, overrides the "),Mo=r("code"),Cr=s("__call__"),Er=s(" special method."),zr=p(),v(ae.$$.fragment),xr=p(),v(ne.$$.fragment),this.h()},l(e){const c=xa('[data-svelte="svelte-1phssyn"]',document.head);m=a(c,"META",{name:!0,content:!0}),c.forEach(t),y=h(e),b=a(e,"H1",{class:!0});var Ne=n(b);g=a(Ne,"A",{id:!0,class:!0,href:!0});var Io=n(g);_=a(Io,"SPAN",{});var Ho=n(_);T(l.$$.fragment,Ho),Ho.forEach(t),Io.forEach(t),u=h(Ne),x=a(Ne,"SPAN",{});var ko=n(x);rt=i(ko,"Hybrid Vision Transformer (ViT Hybrid)"),ko.forEach(t),Ne.forEach(t),Co=h(e),F=a(e,"H2",{class:!0});var Pe=n(F);D=a(Pe,"A",{id:!0,class:!0,href:!0});var Fr=n(D);io=a(Fr,"SPAN",{});var Wr=n(io);T(me.$$.fragment,Wr),Wr.forEach(t),Fr.forEach(t),at=h(Pe),lo=a(Pe,"SPAN",{});var Zr=n(lo);nt=i(Zr,"Overview"),Zr.forEach(t),Pe.forEach(t),Eo=h(e),C=a(e,"P",{});var se=n(C);st=i(se,"The hybrid Vision Transformer (ViT) model was proposed in "),pe=a(se,"A",{href:!0,rel:!0});var Ur=n(pe);it=i(Ur,`An Image is Worth 16x16 Words: Transformers for Image Recognition
at Scale`),Ur.forEach(t),lt=i(se,` 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 `),Ue=a(se,"A",{href:!0});var Ar=n(Ue);dt=i(Ar,"plain Vision Transformer"),Ar.forEach(t),ct=i(se,`,
by leveraging a convolutional backbone (specifically, `),Ae=a(se,"A",{href:!0});var Br=n(Ae);mt=i(Br,"BiT"),Br.forEach(t),pt=i(se,") whose features are used as initial \u201Ctokens\u201D for the Transformer."),se.forEach(t),zo=h(e),Be=a(e,"P",{});var Rr=n(Be);ht=i(Rr,"The abstract from the paper is the following:"),Rr.forEach(t),xo=h(e),Re=a(e,"P",{});var Sr=n(Re);co=a(Sr,"EM",{});var Gr=n(co);ft=i(Gr,`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.`),Gr.forEach(t),Sr.forEach(t),jo=h(e),N=a(e,"P",{});var eo=n(N);gt=i(eo,"This model was contributed by "),he=a(eo,"A",{href:!0,rel:!0});var qr=n(he);ut=i(qr,"nielsr"),qr.forEach(t),bt=i(eo,`. The original code (written in JAX) can be
found `),fe=a(eo,"A",{href:!0,rel:!0});var Dr=n(fe);_t=i(Dr,"here"),Dr.forEach(t),yt=i(eo,"."),eo.forEach(t),Jo=h(e),W=a(e,"H2",{class:!0});var Yo=n(W);Y=a(Yo,"A",{id:!0,class:!0,href:!0});var Yr=n(Y);mo=a(Yr,"SPAN",{});var Lr=n(mo);T(ge.$$.fragment,Lr),Lr.forEach(t),Yr.forEach(t),vt=h(Yo),po=a(Yo,"SPAN",{});var Xr=n(po);Tt=i(Xr,"Resources"),Xr.forEach(t),Yo.forEach(t),No=h(e),Se=a(e,"P",{});var Qr=n(Se);wt=i(Qr,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with ViT Hybrid."),Qr.forEach(t),Po=h(e),T(ue.$$.fragment,e),Fo=h(e),L=a(e,"UL",{});var Lo=n(L);P=a(Lo,"LI",{});var Fe=n(P);Ge=a(Fe,"A",{href:!0});var Or=n(Ge);$t=i(Or,"ViTHybridForImageClassification"),Or.forEach(t),Vt=i(Fe," is supported by this "),be=a(Fe,"A",{href:!0,rel:!0});var Kr=n(be);Mt=i(Kr,"example script"),Kr.forEach(t),It=i(Fe," and "),_e=a(Fe,"A",{href:!0,rel:!0});var ea=n(_e);Ht=i(ea,"notebook"),ea.forEach(t),kt=i(Fe,"."),Fe.forEach(t),Ct=h(Lo),qe=a(Lo,"LI",{});var jr=n(qe);Et=i(jr,"See also: "),De=a(jr,"A",{href:!0});var oa=n(De);zt=i(oa,"Image classification task guide"),oa.forEach(t),jr.forEach(t),Lo.forEach(t),Wo=h(e),Ye=a(e,"P",{});var ta=n(Ye);xt=i(ta,"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."),ta.forEach(t),Zo=h(e),Z=a(e,"H2",{class:!0});var Xo=n(Z);X=a(Xo,"A",{id:!0,class:!0,href:!0});var ra=n(X);ho=a(ra,"SPAN",{});var aa=n(ho);T(ye.$$.fragment,aa),aa.forEach(t),ra.forEach(t),jt=h(Xo),fo=a(Xo,"SPAN",{});var na=n(fo);Jt=i(na,"ViTHybridConfig"),na.forEach(t),Xo.forEach(t),Uo=h(e),I=a(e,"DIV",{class:!0});var ie=n(I);T(ve.$$.fragment,ie),Nt=h(ie),U=a(ie,"P",{});var oo=n(U);Pt=i(oo,"This is the configuration class to store the configuration of a "),Le=a(oo,"A",{href:!0});var sa=n(Le);Ft=i(sa,"ViTHybridModel"),sa.forEach(t),Wt=i(oo,`. 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
`),Te=a(oo,"A",{href:!0,rel:!0});var ia=n(Te);Zt=i(ia,"google/vit-hybrid-base-bit-384"),ia.forEach(t),Ut=i(oo," architecture."),oo.forEach(t),At=h(ie),A=a(ie,"P",{});var to=n(A);Bt=i(to,"Configuration objects inherit from "),Xe=a(to,"A",{href:!0});var la=n(Xe);Rt=i(la,"PretrainedConfig"),la.forEach(t),St=i(to,` and can be used to control the model outputs. Read the
documentation from `),Qe=a(to,"A",{href:!0});var da=n(Qe);Gt=i(da,"PretrainedConfig"),da.forEach(t),qt=i(to," for more information."),to.forEach(t),Dt=h(ie),T(Q.$$.fragment,ie),ie.forEach(t),Ao=h(e),B=a(e,"H2",{class:!0});var Qo=n(B);O=a(Qo,"A",{id:!0,class:!0,href:!0});var ca=n(O);go=a(ca,"SPAN",{});var ma=n(go);T(we.$$.fragment,ma),ma.forEach(t),ca.forEach(t),Yt=h(Qo),uo=a(Qo,"SPAN",{});var pa=n(uo);Lt=i(pa,"ViTHybridImageProcessor"),pa.forEach(t),Qo.forEach(t),Bo=h(e),j=a(e,"DIV",{class:!0});var ro=n(j);T($e.$$.fragment,ro),Xt=h(ro),bo=a(ro,"P",{});var ha=n(bo);Qt=i(ha,"Constructs a ViT Hybrid image processor."),ha.forEach(t),Ot=h(ro),K=a(ro,"DIV",{class:!0});var Oo=n(K);T(Ve.$$.fragment,Oo),Kt=h(Oo),_o=a(Oo,"P",{});var fa=n(_o);er=i(fa,"Preprocess an image or batch of images."),fa.forEach(t),Oo.forEach(t),ro.forEach(t),Ro=h(e),R=a(e,"H2",{class:!0});var Ko=n(R);ee=a(Ko,"A",{id:!0,class:!0,href:!0});var ga=n(ee);yo=a(ga,"SPAN",{});var ua=n(yo);T(Me.$$.fragment,ua),ua.forEach(t),ga.forEach(t),or=h(Ko),vo=a(Ko,"SPAN",{});var ba=n(vo);tr=i(ba,"ViTHybridModel"),ba.forEach(t),Ko.forEach(t),So=h(e),J=a(e,"DIV",{class:!0});var ao=n(J);T(Ie.$$.fragment,ao),rr=h(ao),He=a(ao,"P",{});var et=n(He);ar=i(et,`The bare ViT Hybrid Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ke=a(et,"A",{href:!0,rel:!0});var _a=n(ke);nr=i(_a,"torch.nn.Module"),_a.forEach(t),sr=i(et,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),et.forEach(t),ir=h(ao),E=a(ao,"DIV",{class:!0});var le=n(E);T(Ce.$$.fragment,le),lr=h(le),S=a(le,"P",{});var no=n(S);dr=i(no,"The "),Oe=a(no,"A",{href:!0});var ya=n(Oe);cr=i(ya,"ViTHybridModel"),ya.forEach(t),mr=i(no," forward method, overrides the "),To=a(no,"CODE",{});var va=n(To);pr=i(va,"__call__"),va.forEach(t),hr=i(no," special method."),no.forEach(t),fr=h(le),T(oe.$$.fragment,le),gr=h(le),T(te.$$.fragment,le),le.forEach(t),ao.forEach(t),Go=h(e),G=a(e,"H2",{class:!0});var ot=n(G);re=a(ot,"A",{id:!0,class:!0,href:!0});var Ta=n(re);wo=a(Ta,"SPAN",{});var wa=n(wo);T(Ee.$$.fragment,wa),wa.forEach(t),Ta.forEach(t),ur=h(ot),$o=a(ot,"SPAN",{});var $a=n($o);br=i($a,"ViTHybridForImageClassification"),$a.forEach(t),ot.forEach(t),qo=h(e),H=a(e,"DIV",{class:!0});var de=n(H);T(ze.$$.fragment,de),_r=h(de),Vo=a(de,"P",{});var Va=n(Vo);yr=i(Va,`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.`),Va.forEach(t),vr=h(de),xe=a(de,"P",{});var tt=n(xe);Tr=i(tt,"This model is a PyTorch "),je=a(tt,"A",{href:!0,rel:!0});var Ma=n(je);wr=i(Ma,"torch.nn.Module"),Ma.forEach(t),$r=i(tt,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),tt.forEach(t),Vr=h(de),z=a(de,"DIV",{class:!0});var ce=n(z);T(Je.$$.fragment,ce),Mr=h(ce),q=a(ce,"P",{});var so=n(q);Ir=i(so,"The "),Ke=a(so,"A",{href:!0});var Ia=n(Ke);Hr=i(Ia,"ViTHybridForImageClassification"),Ia.forEach(t),kr=i(so," forward method, overrides the "),Mo=a(so,"CODE",{});var Ha=n(Mo);Cr=i(Ha,"__call__"),Ha.forEach(t),Er=i(so," special method."),so.forEach(t),zr=h(ce),T(ae.$$.fragment,ce),xr=h(ce),T(ne.$$.fragment,ce),ce.forEach(t),de.forEach(t),this.h()},h(){d(m,"name","hf:doc:metadata"),d(m,"content",JSON.stringify(Aa)),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(b,"class","relative group"),d(D,"id","overview"),d(D,"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(D,"href","#overview"),d(F,"class","relative group"),d(pe,"href","https://arxiv.org/abs/2010.11929"),d(pe,"rel","nofollow"),d(Ue,"href","vit"),d(Ae,"href","bit"),d(he,"href","https://huggingface.co/nielsr"),d(he,"rel","nofollow"),d(fe,"href","https://github.com/google-research/vision_transformer"),d(fe,"rel","nofollow"),d(Y,"id","resources"),d(Y,"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(Y,"href","#resources"),d(W,"class","relative group"),d(Ge,"href","/docs/transformers/main/en/model_doc/vit_hybrid#transformers.ViTHybridForImageClassification"),d(be,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification"),d(be,"rel","nofollow"),d(_e,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb"),d(_e,"rel","nofollow"),d(De,"href","../tasks/image_classification"),d(X,"id","transformers.ViTHybridConfig"),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","#transformers.ViTHybridConfig"),d(Z,"class","relative group"),d(Le,"href","/docs/transformers/main/en/model_doc/vit_hybrid#transformers.ViTHybridModel"),d(Te,"href","https://huggingface.co/google/vit-hybrid-base-bit-384"),d(Te,"rel","nofollow"),d(Xe,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(Qe,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),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(O,"id","transformers.ViTHybridImageProcessor"),d(O,"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(O,"href","#transformers.ViTHybridImageProcessor"),d(B,"class","relative group"),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"),d(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ee,"id","transformers.ViTHybridModel"),d(ee,"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(ee,"href","#transformers.ViTHybridModel"),d(R,"class","relative group"),d(ke,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(ke,"rel","nofollow"),d(Oe,"href","/docs/transformers/main/en/model_doc/vit_hybrid#transformers.ViTHybridModel"),d(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(J,"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.ViTHybridForImageClassification"),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.ViTHybridForImageClassification"),d(G,"class","relative group"),d(je,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(je,"rel","nofollow"),d(Ke,"href","/docs/transformers/main/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(H,"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,m),f(e,y,c),f(e,b,c),o(b,g),o(g,_),w(l,_,null),o(b,u),o(b,x),o(x,rt),f(e,Co,c),f(e,F,c),o(F,D),o(D,io),w(me,io,null),o(F,at),o(F,lo),o(lo,nt),f(e,Eo,c),f(e,C,c),o(C,st),o(C,pe),o(pe,it),o(C,lt),o(C,Ue),o(Ue,dt),o(C,ct),o(C,Ae),o(Ae,mt),o(C,pt),f(e,zo,c),f(e,Be,c),o(Be,ht),f(e,xo,c),f(e,Re,c),o(Re,co),o(co,ft),f(e,jo,c),f(e,N,c),o(N,gt),o(N,he),o(he,ut),o(N,bt),o(N,fe),o(fe,_t),o(N,yt),f(e,Jo,c),f(e,W,c),o(W,Y),o(Y,mo),w(ge,mo,null),o(W,vt),o(W,po),o(po,Tt),f(e,No,c),f(e,Se,c),o(Se,wt),f(e,Po,c),w(ue,e,c),f(e,Fo,c),f(e,L,c),o(L,P),o(P,Ge),o(Ge,$t),o(P,Vt),o(P,be),o(be,Mt),o(P,It),o(P,_e),o(_e,Ht),o(P,kt),o(L,Ct),o(L,qe),o(qe,Et),o(qe,De),o(De,zt),f(e,Wo,c),f(e,Ye,c),o(Ye,xt),f(e,Zo,c),f(e,Z,c),o(Z,X),o(X,ho),w(ye,ho,null),o(Z,jt),o(Z,fo),o(fo,Jt),f(e,Uo,c),f(e,I,c),w(ve,I,null),o(I,Nt),o(I,U),o(U,Pt),o(U,Le),o(Le,Ft),o(U,Wt),o(U,Te),o(Te,Zt),o(U,Ut),o(I,At),o(I,A),o(A,Bt),o(A,Xe),o(Xe,Rt),o(A,St),o(A,Qe),o(Qe,Gt),o(A,qt),o(I,Dt),w(Q,I,null),f(e,Ao,c),f(e,B,c),o(B,O),o(O,go),w(we,go,null),o(B,Yt),o(B,uo),o(uo,Lt),f(e,Bo,c),f(e,j,c),w($e,j,null),o(j,Xt),o(j,bo),o(bo,Qt),o(j,Ot),o(j,K),w(Ve,K,null),o(K,Kt),o(K,_o),o(_o,er),f(e,Ro,c),f(e,R,c),o(R,ee),o(ee,yo),w(Me,yo,null),o(R,or),o(R,vo),o(vo,tr),f(e,So,c),f(e,J,c),w(Ie,J,null),o(J,rr),o(J,He),o(He,ar),o(He,ke),o(ke,nr),o(He,sr),o(J,ir),o(J,E),w(Ce,E,null),o(E,lr),o(E,S),o(S,dr),o(S,Oe),o(Oe,cr),o(S,mr),o(S,To),o(To,pr),o(S,hr),o(E,fr),w(oe,E,null),o(E,gr),w(te,E,null),f(e,Go,c),f(e,G,c),o(G,re),o(re,wo),w(Ee,wo,null),o(G,ur),o(G,$o),o($o,br),f(e,qo,c),f(e,H,c),w(ze,H,null),o(H,_r),o(H,Vo),o(Vo,yr),o(H,vr),o(H,xe),o(xe,Tr),o(xe,je),o(je,wr),o(xe,$r),o(H,Vr),o(H,z),w(Je,z,null),o(z,Mr),o(z,q),o(q,Ir),o(q,Ke),o(Ke,Hr),o(q,kr),o(q,Mo),o(Mo,Cr),o(q,Er),o(z,zr),w(ae,z,null),o(z,xr),w(ne,z,null),Do=!0},p(e,[c]){const Ne={};c&2&&(Ne.$$scope={dirty:c,ctx:e}),Q.$set(Ne);const Io={};c&2&&(Io.$$scope={dirty:c,ctx:e}),oe.$set(Io);const Ho={};c&2&&(Ho.$$scope={dirty:c,ctx:e}),te.$set(Ho);const ko={};c&2&&(ko.$$scope={dirty:c,ctx:e}),ae.$set(ko);const Pe={};c&2&&(Pe.$$scope={dirty:c,ctx:e}),ne.$set(Pe)},i(e){Do||($(l.$$.fragment,e),$(me.$$.fragment,e),$(ge.$$.fragment,e),$(ue.$$.fragment,e),$(ye.$$.fragment,e),$(ve.$$.fragment,e),$(Q.$$.fragment,e),$(we.$$.fragment,e),$($e.$$.fragment,e),$(Ve.$$.fragment,e),$(Me.$$.fragment,e),$(Ie.$$.fragment,e),$(Ce.$$.fragment,e),$(oe.$$.fragment,e),$(te.$$.fragment,e),$(Ee.$$.fragment,e),$(ze.$$.fragment,e),$(Je.$$.fragment,e),$(ae.$$.fragment,e),$(ne.$$.fragment,e),Do=!0)},o(e){V(l.$$.fragment,e),V(me.$$.fragment,e),V(ge.$$.fragment,e),V(ue.$$.fragment,e),V(ye.$$.fragment,e),V(ve.$$.fragment,e),V(Q.$$.fragment,e),V(we.$$.fragment,e),V($e.$$.fragment,e),V(Ve.$$.fragment,e),V(Me.$$.fragment,e),V(Ie.$$.fragment,e),V(Ce.$$.fragment,e),V(oe.$$.fragment,e),V(te.$$.fragment,e),V(Ee.$$.fragment,e),V(ze.$$.fragment,e),V(Je.$$.fragment,e),V(ae.$$.fragment,e),V(ne.$$.fragment,e),Do=!1},d(e){t(m),e&&t(y),e&&t(b),M(l),e&&t(Co),e&&t(F),M(me),e&&t(Eo),e&&t(C),e&&t(zo),e&&t(Be),e&&t(xo),e&&t(Re),e&&t(jo),e&&t(N),e&&t(Jo),e&&t(W),M(ge),e&&t(No),e&&t(Se),e&&t(Po),M(ue,e),e&&t(Fo),e&&t(L),e&&t(Wo),e&&t(Ye),e&&t(Zo),e&&t(Z),M(ye),e&&t(Uo),e&&t(I),M(ve),M(Q),e&&t(Ao),e&&t(B),M(we),e&&t(Bo),e&&t(j),M($e),M(Ve),e&&t(Ro),e&&t(R),M(Me),e&&t(So),e&&t(J),M(Ie),M(Ce),M(oe),M(te),e&&t(Go),e&&t(G),M(Ee),e&&t(qo),e&&t(H),M(ze),M(Je),M(ae),M(ne)}}}const Aa={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 Ba(k){return ja(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Xa extends Ca{constructor(m){super();Ea(this,m,Ba,Ua,za,{})}}export{Xa as default,Aa as metadata};
