import{s as Le,o as ze,n as be}from"../chunks/scheduler.18a86fab.js";import{S as Je,i as Ne,g as f,s as r,r as $,A as He,h,f as a,c as i,j as Ce,u as T,x as C,k as ge,y as c,a as l,v as M,d as y,t as w,w as x}from"../chunks/index.98837b22.js";import{T as Fe}from"../chunks/Tip.77304350.js";import{D as Me}from"../chunks/Docstring.6758ea23.js";import{C as Ue}from"../chunks/CodeBlock.8d0c2e8a.js";import{F as Ve,M as We}from"../chunks/Markdown.ae01904b.js";import{E as Ie}from"../chunks/ExampleCodeBlock.0c42463f.js";import{P as Re}from"../chunks/PipelineTag.7749150e.js";import{H as Te}from"../chunks/Heading.7e7e0c5b.js";import{E as Pe}from"../chunks/index.499f366c.js";function Ee(k){let e,m="Example:",t,s,u;return s=new Ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEN2dENvbmZpZyUyQyUyMEN2dE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEN2dCUyMG1zZnQlMkZjdnQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ3Z0Q29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMG1zZnQlMkZjdnQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEN2dE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CvtConfig, CvtModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Cvt msft/cvt style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = CvtConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the msft/cvt style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CvtModel(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(){e=f("p"),e.textContent=m,t=r(),$(s.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),C(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(n),T(s.$$.fragment,n)},m(n,v){l(n,e,v),l(n,t,v),M(s,n,v),u=!0},p:be,i(n){u||(y(s.$$.fragment,n),u=!0)},o(n){w(s.$$.fragment,n),u=!1},d(n){n&&(a(e),a(t)),x(s,n)}}}function Be(k){let e,m=`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(){e=f("p"),e.innerHTML=m},l(t){e=h(t,"P",{"data-svelte-h":!0}),C(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){l(t,e,s)},p:be,d(t){t&&a(e)}}}function qe(k){let e,m=`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(){e=f("p"),e.innerHTML=m},l(t){e=h(t,"P",{"data-svelte-h":!0}),C(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){l(t,e,s)},p:be,d(t){t&&a(e)}}}function Ge(k){let e,m="Example:",t,s,u;return s=new Ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEN2dEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmN2dC0xMyUyMiklMEFtb2RlbCUyMCUzRCUyMEN2dEZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmN2dC0xMyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpLml0ZW0oKSUwQXByaW50KG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9sYWJlbCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, CvtForImageClassification
<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;microsoft/cvt-13&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CvtForImageClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/cvt-13&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])
...`,wrap:!1}}),{c(){e=f("p"),e.textContent=m,t=r(),$(s.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),C(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(n),T(s.$$.fragment,n)},m(n,v){l(n,e,v),l(n,t,v),M(s,n,v),u=!0},p:be,i(n){u||(y(s.$$.fragment,n),u=!0)},o(n){w(s.$$.fragment,n),u=!1},d(n){n&&(a(e),a(t)),x(s,n)}}}function Qe(k){let e,m,t,s,u,n,v="The bare Cvt Model outputting raw hidden-states without any specific head on top.",O,_,W=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,pe,V,ye=`This model is also 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.`,fe,U,re,R,N,$e='The <a href="/docs/transformers/main/en/model_doc/cvt#transformers.CvtModel">CvtModel</a> forward method, overrides the <code>__call__</code> special method.',ne,Q,ue,P,K,F,E,ie,ee,I=`Cvt 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.`,te,Y,he=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,ve,D,le=`This model is also 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.`,de,S,A,ce,me,oe='The <a href="/docs/transformers/main/en/model_doc/cvt#transformers.CvtForImageClassification">CvtForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',se,Z,L,B,ae;return e=new Te({props:{title:"CvtModel",local:"transformers.CvtModel",headingTag:"h2"}}),s=new Me({props:{name:"class transformers.CvtModel",anchor:"transformers.CvtModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.CvtModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/cvt#transformers.CvtModel">CvtModel</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"},{anchor:"transformers.CvtModel.add_pooling_layer",description:`<strong>add_pooling_layer</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a pooling layer`,name:"add_pooling_layer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cvt/modeling_cvt.py#L537"}}),re=new Me({props:{name:"forward",anchor:"transformers.CvtModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CvtModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.CvtModel.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.CvtModel.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cvt/modeling_cvt.py#L557",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.cvt.modeling_cvt.BaseModelOutputWithCLSToken</code> 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/cvt#transformers.CvtConfig"
>CvtConfig</a>) and inputs.</p>
<ul>
<li><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.</li>
<li><strong>cls_token_value</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 1, hidden_size)</code>) — Classification token at the output of the last layer of the model.</li>
<li><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 + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the model at the output of each layer
plus the initial embedding outputs.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.cvt.modeling_cvt.BaseModelOutputWithCLSToken</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Q=new Fe({props:{$$slots:{default:[Be]},$$scope:{ctx:k}}}),P=new Te({props:{title:"CvtForImageClassification",local:"transformers.CvtForImageClassification",headingTag:"h2"}}),E=new Me({props:{name:"class transformers.CvtForImageClassification",anchor:"transformers.CvtForImageClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CvtForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/cvt#transformers.CvtForImageClassification">CvtForImageClassification</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/cvt/modeling_cvt.py#L589"}}),A=new Me({props:{name:"forward",anchor:"transformers.CvtForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CvtForImageClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>, <em>optional</em>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<code>{image_processor_class}</code>. See <code>{image_processor_class}.__call__</code> for details (<code>{processor_class}</code> uses
<code>{image_processor_class}</code> for processing images).`,name:"pixel_values"},{anchor:"transformers.CvtForImageClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.Tensor</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"},{anchor:"transformers.CvtForImageClassification.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.CvtForImageClassification.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cvt/modeling_cvt.py#L610",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</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/cvt#transformers.CvtConfig"
>CvtConfig</a>) and inputs.</p>
<ul>
<li><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.</li>
<li><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).</li>
<li><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, num_channels, height, width)</code>. Hidden-states (also
called feature maps) of the model at the output of each stage.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Z=new Fe({props:{$$slots:{default:[qe]},$$scope:{ctx:k}}}),B=new Ie({props:{anchor:"transformers.CvtForImageClassification.forward.example",$$slots:{default:[Ge]},$$scope:{ctx:k}}}),{c(){$(e.$$.fragment),m=r(),t=f("div"),$(s.$$.fragment),u=r(),n=f("p"),n.textContent=v,O=r(),_=f("p"),_.innerHTML=W,pe=r(),V=f("p"),V.innerHTML=ye,fe=r(),U=f("div"),$(re.$$.fragment),R=r(),N=f("p"),N.innerHTML=$e,ne=r(),$(Q.$$.fragment),ue=r(),$(P.$$.fragment),K=r(),F=f("div"),$(E.$$.fragment),ie=r(),ee=f("p"),ee.textContent=I,te=r(),Y=f("p"),Y.innerHTML=he,ve=r(),D=f("p"),D.innerHTML=le,de=r(),S=f("div"),$(A.$$.fragment),ce=r(),me=f("p"),me.innerHTML=oe,se=r(),$(Z.$$.fragment),L=r(),$(B.$$.fragment),this.h()},l(p){T(e.$$.fragment,p),m=i(p),t=h(p,"DIV",{class:!0});var j=Ce(t);T(s.$$.fragment,j),u=i(j),n=h(j,"P",{"data-svelte-h":!0}),C(n)!=="svelte-5qrnan"&&(n.textContent=v),O=i(j),_=h(j,"P",{"data-svelte-h":!0}),C(_)!=="svelte-6pahdo"&&(_.innerHTML=W),pe=i(j),V=h(j,"P",{"data-svelte-h":!0}),C(V)!=="svelte-hswkmf"&&(V.innerHTML=ye),fe=i(j),U=h(j,"DIV",{class:!0});var H=Ce(U);T(re.$$.fragment,H),R=i(H),N=h(H,"P",{"data-svelte-h":!0}),C(N)!=="svelte-1obn7s"&&(N.innerHTML=$e),ne=i(H),T(Q.$$.fragment,H),H.forEach(a),j.forEach(a),ue=i(p),T(P.$$.fragment,p),K=i(p),F=h(p,"DIV",{class:!0});var z=Ce(F);T(E.$$.fragment,z),ie=i(z),ee=h(z,"P",{"data-svelte-h":!0}),C(ee)!=="svelte-ztj7cy"&&(ee.textContent=I),te=i(z),Y=h(z,"P",{"data-svelte-h":!0}),C(Y)!=="svelte-6pahdo"&&(Y.innerHTML=he),ve=i(z),D=h(z,"P",{"data-svelte-h":!0}),C(D)!=="svelte-hswkmf"&&(D.innerHTML=le),de=i(z),S=h(z,"DIV",{class:!0});var J=Ce(S);T(A.$$.fragment,J),ce=i(J),me=h(J,"P",{"data-svelte-h":!0}),C(me)!=="svelte-1cosh7w"&&(me.innerHTML=oe),se=i(J),T(Z.$$.fragment,J),L=i(J),T(B.$$.fragment,J),J.forEach(a),z.forEach(a),this.h()},h(){ge(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ge(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ge(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ge(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(p,j){M(e,p,j),l(p,m,j),l(p,t,j),M(s,t,null),c(t,u),c(t,n),c(t,O),c(t,_),c(t,pe),c(t,V),c(t,fe),c(t,U),M(re,U,null),c(U,R),c(U,N),c(U,ne),M(Q,U,null),l(p,ue,j),M(P,p,j),l(p,K,j),l(p,F,j),M(E,F,null),c(F,ie),c(F,ee),c(F,te),c(F,Y),c(F,ve),c(F,D),c(F,de),c(F,S),M(A,S,null),c(S,ce),c(S,me),c(S,se),M(Z,S,null),c(S,L),M(B,S,null),ae=!0},p(p,j){const H={};j&2&&(H.$$scope={dirty:j,ctx:p}),Q.$set(H);const z={};j&2&&(z.$$scope={dirty:j,ctx:p}),Z.$set(z);const J={};j&2&&(J.$$scope={dirty:j,ctx:p}),B.$set(J)},i(p){ae||(y(e.$$.fragment,p),y(s.$$.fragment,p),y(re.$$.fragment,p),y(Q.$$.fragment,p),y(P.$$.fragment,p),y(E.$$.fragment,p),y(A.$$.fragment,p),y(Z.$$.fragment,p),y(B.$$.fragment,p),ae=!0)},o(p){w(e.$$.fragment,p),w(s.$$.fragment,p),w(re.$$.fragment,p),w(Q.$$.fragment,p),w(P.$$.fragment,p),w(E.$$.fragment,p),w(A.$$.fragment,p),w(Z.$$.fragment,p),w(B.$$.fragment,p),ae=!1},d(p){p&&(a(m),a(t),a(ue),a(K),a(F)),x(e,p),x(s),x(re),x(Q),x(P,p),x(E),x(A),x(Z),x(B)}}}function Se(k){let e,m;return e=new We({props:{$$slots:{default:[Qe]},$$scope:{ctx:k}}}),{c(){$(e.$$.fragment)},l(t){T(e.$$.fragment,t)},m(t,s){M(e,t,s),m=!0},p(t,s){const u={};s&2&&(u.$$scope={dirty:s,ctx:t}),e.$set(u)},i(t){m||(y(e.$$.fragment,t),m=!0)},o(t){w(e.$$.fragment,t),m=!1},d(t){x(e,t)}}}function Ae(k){let e,m="TF 2.0 models accepts two formats as inputs:",t,s,u="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional arguments.</li>",n,v,O=`This second option is useful when using <code>keras.Model.fit</code> method which currently requires having all the
tensors in the first argument of the model call function: <code>model(inputs)</code>.`;return{c(){e=f("p"),e.textContent=m,t=r(),s=f("ul"),s.innerHTML=u,n=r(),v=f("p"),v.innerHTML=O},l(_){e=h(_,"P",{"data-svelte-h":!0}),C(e)!=="svelte-ha0dwg"&&(e.textContent=m),t=i(_),s=h(_,"UL",{"data-svelte-h":!0}),C(s)!=="svelte-1ar3osv"&&(s.innerHTML=u),n=i(_),v=h(_,"P",{"data-svelte-h":!0}),C(v)!=="svelte-14kkttf"&&(v.innerHTML=O)},m(_,W){l(_,e,W),l(_,t,W),l(_,s,W),l(_,n,W),l(_,v,W)},p:be,d(_){_&&(a(e),a(t),a(s),a(n),a(v))}}}function Xe(k){let e,m=`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(){e=f("p"),e.innerHTML=m},l(t){e=h(t,"P",{"data-svelte-h":!0}),C(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){l(t,e,s)},p:be,d(t){t&&a(e)}}}function Ye(k){let e,m="Examples:",t,s,u;return s=new Ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGQ3Z0TW9kZWwlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmN2dC0xMyUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQ3Z0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmN2dC0xMyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFCvtModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/cvt-13&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCvtModel.from_pretrained(<span class="hljs-string">&quot;microsoft/cvt-13&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`,wrap:!1}}),{c(){e=f("p"),e.textContent=m,t=r(),$(s.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),C(e)!=="svelte-kvfsh7"&&(e.textContent=m),t=i(n),T(s.$$.fragment,n)},m(n,v){l(n,e,v),l(n,t,v),M(s,n,v),u=!0},p:be,i(n){u||(y(s.$$.fragment,n),u=!0)},o(n){w(s.$$.fragment,n),u=!1},d(n){n&&(a(e),a(t)),x(s,n)}}}function De(k){let e,m="TF 2.0 models accepts two formats as inputs:",t,s,u="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional arguments.</li>",n,v,O=`This second option is useful when using <code>keras.Model.fit</code> method which currently requires having all the
tensors in the first argument of the model call function: <code>model(inputs)</code>.`;return{c(){e=f("p"),e.textContent=m,t=r(),s=f("ul"),s.innerHTML=u,n=r(),v=f("p"),v.innerHTML=O},l(_){e=h(_,"P",{"data-svelte-h":!0}),C(e)!=="svelte-ha0dwg"&&(e.textContent=m),t=i(_),s=h(_,"UL",{"data-svelte-h":!0}),C(s)!=="svelte-1ar3osv"&&(s.innerHTML=u),n=i(_),v=h(_,"P",{"data-svelte-h":!0}),C(v)!=="svelte-14kkttf"&&(v.innerHTML=O)},m(_,W){l(_,e,W),l(_,t,W),l(_,s,W),l(_,n,W),l(_,v,W)},p:be,d(_){_&&(a(e),a(t),a(s),a(n),a(v))}}}function Oe(k){let e,m=`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(){e=f("p"),e.innerHTML=m},l(t){e=h(t,"P",{"data-svelte-h":!0}),C(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){l(t,e,s)},p:be,d(t){t&&a(e)}}}function Ke(k){let e,m="Examples:",t,s,u;return s=new Ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGQ3Z0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZjdnQtMTMlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkN2dEZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmN2dC0xMyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfY2xhc3NfaWR4JTIwJTNEJTIwdGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQlMEFwcmludCglMjJQcmVkaWN0ZWQlMjBjbGFzcyUzQSUyMiUyQyUyMG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QmludChwcmVkaWN0ZWRfY2xhc3NfaWR4KSU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFCvtForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/cvt-13&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCvtForImageClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/cvt-13&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.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_class_idx = tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Predicted class:&quot;</span>, model.config.id2label[<span class="hljs-built_in">int</span>(predicted_class_idx)])`,wrap:!1}}),{c(){e=f("p"),e.textContent=m,t=r(),$(s.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),C(e)!=="svelte-kvfsh7"&&(e.textContent=m),t=i(n),T(s.$$.fragment,n)},m(n,v){l(n,e,v),l(n,t,v),M(s,n,v),u=!0},p:be,i(n){u||(y(s.$$.fragment,n),u=!0)},o(n){w(s.$$.fragment,n),u=!1},d(n){n&&(a(e),a(t)),x(s,n)}}}function et(k){let e,m,t,s,u,n,v="The bare Cvt Model transformer outputting raw hidden-states without any specific head on top.",O,_,W=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,pe,V,ye=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,fe,U,re,R,N,$e,ne,Q='The <a href="/docs/transformers/main/en/model_doc/cvt#transformers.TFCvtModel">TFCvtModel</a> forward method, overrides the <code>__call__</code> special method.',ue,P,K,F,E,ie,ee,I,te,Y,he,ve=`Cvt 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.`,D,le,de=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,S,A,ce=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,me,oe,se,Z,L,B,ae,p='The <a href="/docs/transformers/main/en/model_doc/cvt#transformers.TFCvtForImageClassification">TFCvtForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',j,H,z,J,we;return e=new Te({props:{title:"TFCvtModel",local:"transformers.TFCvtModel",headingTag:"h2"}}),s=new Me({props:{name:"class transformers.TFCvtModel",anchor:"transformers.TFCvtModel",parameters:[{name:"config",val:": CvtConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCvtModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/cvt#transformers.CvtConfig">CvtConfig</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.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cvt/modeling_tf_cvt.py#L916"}}),U=new Fe({props:{$$slots:{default:[Ae]},$$scope:{ctx:k}}}),N=new Me({props:{name:"call",anchor:"transformers.TFCvtModel.call",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCvtModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the 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 <code>CvtImageProcessor.__call__</code>
for details.`,name:"pixel_values"},{anchor:"transformers.TFCvtModel.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCvtModel.call.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. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCvtModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cvt/modeling_tf_cvt.py#L926",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.cvt.modeling_tf_cvt.TFBaseModelOutputWithCLSToken</code> or a tuple of <code>tf.Tensor</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/cvt#transformers.CvtConfig"
>CvtConfig</a>) and inputs.</p>
<ul>
<li><strong>last_hidden_state</strong> (<code>tf.Tensor</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.</li>
<li><strong>cls_token_value</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, 1, hidden_size)</code>) — Classification token at the output of the last layer of the model.</li>
<li><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the model at the output of each layer plus
the initial embedding outputs.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.cvt.modeling_tf_cvt.TFBaseModelOutputWithCLSToken</code> or <code>tuple(tf.Tensor)</code></p>
`}}),P=new Fe({props:{$$slots:{default:[Xe]},$$scope:{ctx:k}}}),F=new Ie({props:{anchor:"transformers.TFCvtModel.call.example",$$slots:{default:[Ye]},$$scope:{ctx:k}}}),ie=new Te({props:{title:"TFCvtForImageClassification",local:"transformers.TFCvtForImageClassification",headingTag:"h2"}}),te=new Me({props:{name:"class transformers.TFCvtForImageClassification",anchor:"transformers.TFCvtForImageClassification",parameters:[{name:"config",val:": CvtConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCvtForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/cvt#transformers.CvtConfig">CvtConfig</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.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cvt/modeling_tf_cvt.py#L985"}}),oe=new Fe({props:{$$slots:{default:[De]},$$scope:{ctx:k}}}),L=new Me({props:{name:"call",anchor:"transformers.TFCvtForImageClassification.call",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"labels",val:": tf.Tensor | None = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCvtForImageClassification.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the 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 <code>CvtImageProcessor.__call__</code>
for details.`,name:"pixel_values"},{anchor:"transformers.TFCvtForImageClassification.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCvtForImageClassification.call.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. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCvtForImageClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFCvtForImageClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</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/cvt/modeling_tf_cvt.py#L1011",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.modeling_tf_outputs.TFImageClassifierOutputWithNoAttention</code> or a tuple of <code>tf.Tensor</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/cvt#transformers.CvtConfig"
>CvtConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>tf.Tensor</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.</li>
<li><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Classification (or regression if config.num_labels==1) scores (before SoftMax).</li>
<li><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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, num_channels, height, width)</code>. Hidden-states (also called
feature maps) of the model at the output of each stage.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.modeling_tf_outputs.TFImageClassifierOutputWithNoAttention</code> or <code>tuple(tf.Tensor)</code></p>
`}}),H=new Fe({props:{$$slots:{default:[Oe]},$$scope:{ctx:k}}}),J=new Ie({props:{anchor:"transformers.TFCvtForImageClassification.call.example",$$slots:{default:[Ke]},$$scope:{ctx:k}}}),{c(){$(e.$$.fragment),m=r(),t=f("div"),$(s.$$.fragment),u=r(),n=f("p"),n.textContent=v,O=r(),_=f("p"),_.innerHTML=W,pe=r(),V=f("p"),V.innerHTML=ye,fe=r(),$(U.$$.fragment),re=r(),R=f("div"),$(N.$$.fragment),$e=r(),ne=f("p"),ne.innerHTML=Q,ue=r(),$(P.$$.fragment),K=r(),$(F.$$.fragment),E=r(),$(ie.$$.fragment),ee=r(),I=f("div"),$(te.$$.fragment),Y=r(),he=f("p"),he.textContent=ve,D=r(),le=f("p"),le.innerHTML=de,S=r(),A=f("p"),A.innerHTML=ce,me=r(),$(oe.$$.fragment),se=r(),Z=f("div"),$(L.$$.fragment),B=r(),ae=f("p"),ae.innerHTML=p,j=r(),$(H.$$.fragment),z=r(),$(J.$$.fragment),this.h()},l(d){T(e.$$.fragment,d),m=i(d),t=h(d,"DIV",{class:!0});var b=Ce(t);T(s.$$.fragment,b),u=i(b),n=h(b,"P",{"data-svelte-h":!0}),C(n)!=="svelte-5yjryq"&&(n.textContent=v),O=i(b),_=h(b,"P",{"data-svelte-h":!0}),C(_)!=="svelte-1qaxm70"&&(_.innerHTML=W),pe=i(b),V=h(b,"P",{"data-svelte-h":!0}),C(V)!=="svelte-1be7e3c"&&(V.innerHTML=ye),fe=i(b),T(U.$$.fragment,b),re=i(b),R=h(b,"DIV",{class:!0});var q=Ce(R);T(N.$$.fragment,q),$e=i(q),ne=h(q,"P",{"data-svelte-h":!0}),C(ne)!=="svelte-1nw9jz0"&&(ne.innerHTML=Q),ue=i(q),T(P.$$.fragment,q),K=i(q),T(F.$$.fragment,q),q.forEach(a),b.forEach(a),E=i(d),T(ie.$$.fragment,d),ee=i(d),I=h(d,"DIV",{class:!0});var G=Ce(I);T(te.$$.fragment,G),Y=i(G),he=h(G,"P",{"data-svelte-h":!0}),C(he)!=="svelte-ztj7cy"&&(he.textContent=ve),D=i(G),le=h(G,"P",{"data-svelte-h":!0}),C(le)!=="svelte-1qaxm70"&&(le.innerHTML=de),S=i(G),A=h(G,"P",{"data-svelte-h":!0}),C(A)!=="svelte-1be7e3c"&&(A.innerHTML=ce),me=i(G),T(oe.$$.fragment,G),se=i(G),Z=h(G,"DIV",{class:!0});var X=Ce(Z);T(L.$$.fragment,X),B=i(X),ae=h(X,"P",{"data-svelte-h":!0}),C(ae)!=="svelte-1u5lkz8"&&(ae.innerHTML=p),j=i(X),T(H.$$.fragment,X),z=i(X),T(J.$$.fragment,X),X.forEach(a),G.forEach(a),this.h()},h(){ge(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ge(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ge(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),ge(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(d,b){M(e,d,b),l(d,m,b),l(d,t,b),M(s,t,null),c(t,u),c(t,n),c(t,O),c(t,_),c(t,pe),c(t,V),c(t,fe),M(U,t,null),c(t,re),c(t,R),M(N,R,null),c(R,$e),c(R,ne),c(R,ue),M(P,R,null),c(R,K),M(F,R,null),l(d,E,b),M(ie,d,b),l(d,ee,b),l(d,I,b),M(te,I,null),c(I,Y),c(I,he),c(I,D),c(I,le),c(I,S),c(I,A),c(I,me),M(oe,I,null),c(I,se),c(I,Z),M(L,Z,null),c(Z,B),c(Z,ae),c(Z,j),M(H,Z,null),c(Z,z),M(J,Z,null),we=!0},p(d,b){const q={};b&2&&(q.$$scope={dirty:b,ctx:d}),U.$set(q);const G={};b&2&&(G.$$scope={dirty:b,ctx:d}),P.$set(G);const X={};b&2&&(X.$$scope={dirty:b,ctx:d}),F.$set(X);const je={};b&2&&(je.$$scope={dirty:b,ctx:d}),oe.$set(je);const xe={};b&2&&(xe.$$scope={dirty:b,ctx:d}),H.$set(xe);const ke={};b&2&&(ke.$$scope={dirty:b,ctx:d}),J.$set(ke)},i(d){we||(y(e.$$.fragment,d),y(s.$$.fragment,d),y(U.$$.fragment,d),y(N.$$.fragment,d),y(P.$$.fragment,d),y(F.$$.fragment,d),y(ie.$$.fragment,d),y(te.$$.fragment,d),y(oe.$$.fragment,d),y(L.$$.fragment,d),y(H.$$.fragment,d),y(J.$$.fragment,d),we=!0)},o(d){w(e.$$.fragment,d),w(s.$$.fragment,d),w(U.$$.fragment,d),w(N.$$.fragment,d),w(P.$$.fragment,d),w(F.$$.fragment,d),w(ie.$$.fragment,d),w(te.$$.fragment,d),w(oe.$$.fragment,d),w(L.$$.fragment,d),w(H.$$.fragment,d),w(J.$$.fragment,d),we=!1},d(d){d&&(a(m),a(t),a(E),a(ee),a(I)),x(e,d),x(s),x(U),x(N),x(P),x(F),x(ie,d),x(te),x(oe),x(L),x(H),x(J)}}}function tt(k){let e,m;return e=new We({props:{$$slots:{default:[et]},$$scope:{ctx:k}}}),{c(){$(e.$$.fragment)},l(t){T(e.$$.fragment,t)},m(t,s){M(e,t,s),m=!0},p(t,s){const u={};s&2&&(u.$$scope={dirty:s,ctx:t}),e.$set(u)},i(t){m||(y(e.$$.fragment,t),m=!0)},o(t){w(e.$$.fragment,t),m=!1},d(t){x(e,t)}}}function ot(k){let e,m,t,s,u,n,v,O='<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/> <img alt="TensorFlow" src="https://img.shields.io/badge/TensorFlow-FF6F00?style=flat&amp;logo=tensorflow&amp;logoColor=white"/>',_,W,pe,V,ye='The CvT model was proposed in <a href="https://arxiv.org/abs/2103.15808" rel="nofollow">CvT: Introducing Convolutions to Vision Transformers</a> by Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan and Lei Zhang. The Convolutional vision Transformer (CvT) improves the <a href="vit">Vision Transformer (ViT)</a> in performance and efficiency by introducing convolutions into ViT to yield the best of both designs.',fe,U,re="The abstract from the paper is the following:",R,N,$e=`<em>We present in this paper a new architecture, named Convolutional vision Transformer (CvT), that improves Vision Transformer (ViT)
in performance and efficiency by introducing convolutions into ViT to yield the best of both designs. This is accomplished through
two primary modifications: a hierarchy of Transformers containing a new convolutional token embedding, and a convolutional Transformer
block leveraging a convolutional projection. These changes introduce desirable properties of convolutional neural networks (CNNs)
to the ViT architecture (\\ie shift, scale, and distortion invariance) while maintaining the merits of Transformers (\\ie dynamic attention,
global context, and better generalization). We validate CvT by conducting extensive experiments, showing that this approach achieves
state-of-the-art performance over other Vision Transformers and ResNets on ImageNet-1k, with fewer parameters and lower FLOPs. In addition,
performance gains are maintained when pretrained on larger datasets (\\eg ImageNet-22k) and fine-tuned to downstream tasks. Pre-trained on
ImageNet-22k, our CvT-W24 obtains a top-1 accuracy of 87.7\\% on the ImageNet-1k val set. Finally, our results show that the positional encoding,
a crucial component in existing Vision Transformers, can be safely removed in our model, simplifying the design for higher resolution vision tasks.</em>`,ne,Q,ue='This model was contributed by <a href="https://huggingface.co/anugunj" rel="nofollow">anugunj</a>. The original code can be found <a href="https://github.com/microsoft/CvT" rel="nofollow">here</a>.',P,K,F,E,ie=`<li>CvT models are regular Vision Transformers, but trained with convolutions. They outperform the <a href="vit">original model (ViT)</a> when fine-tuned on ImageNet-1K and CIFAR-100.</li> <li>You can check out demo notebooks regarding inference as well as fine-tuning on custom data <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/VisionTransformer" rel="nofollow">here</a> (you can just replace <a href="/docs/transformers/main/en/model_doc/vit#transformers.ViTFeatureExtractor">ViTFeatureExtractor</a> by <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a> and <a href="/docs/transformers/main/en/model_doc/vit#transformers.ViTForImageClassification">ViTForImageClassification</a> by <a href="/docs/transformers/main/en/model_doc/cvt#transformers.CvtForImageClassification">CvtForImageClassification</a>).</li> <li>The available checkpoints are either (1) pre-trained on <a href="http://www.image-net.org/" rel="nofollow">ImageNet-22k</a> (a collection of 14 million images and 22k classes) only, (2) also fine-tuned on ImageNet-22k or (3) also fine-tuned on <a href="http://www.image-net.org/challenges/LSVRC/2012/" rel="nofollow">ImageNet-1k</a> (also referred to as ILSVRC 2012, a collection of 1.3 million
images and 1,000 classes).</li>`,ee,I,te,Y,he="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with CvT.",ve,D,le,de,S='<li><a href="/docs/transformers/main/en/model_doc/cvt#transformers.CvtForImageClassification">CvtForImageClassification</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>',A,ce,me="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.",oe,se,Z,L,B,ae,p,j=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/cvt#transformers.CvtModel">CvtModel</a>. It is used to instantiate a CvT 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 CvT
<a href="https://huggingface.co/microsoft/cvt-13" rel="nofollow">microsoft/cvt-13</a> architecture.`,H,z,J=`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.`,we,d,b,q,G,X,je,xe,ke;return u=new Te({props:{title:"Convolutional Vision Transformer (CvT)",local:"convolutional-vision-transformer-cvt",headingTag:"h1"}}),W=new Te({props:{title:"Overview",local:"overview",headingTag:"h2"}}),K=new Te({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),I=new Te({props:{title:"Resources",local:"resources",headingTag:"h2"}}),D=new Re({props:{pipeline:"image-classification"}}),se=new Te({props:{title:"CvtConfig",local:"transformers.CvtConfig",headingTag:"h2"}}),B=new Me({props:{name:"class transformers.CvtConfig",anchor:"transformers.CvtConfig",parameters:[{name:"num_channels",val:" = 3"},{name:"patch_sizes",val:" = [7, 3, 3]"},{name:"patch_stride",val:" = [4, 2, 2]"},{name:"patch_padding",val:" = [2, 1, 1]"},{name:"embed_dim",val:" = [64, 192, 384]"},{name:"num_heads",val:" = [1, 3, 6]"},{name:"depth",val:" = [1, 2, 10]"},{name:"mlp_ratio",val:" = [4.0, 4.0, 4.0]"},{name:"attention_drop_rate",val:" = [0.0, 0.0, 0.0]"},{name:"drop_rate",val:" = [0.0, 0.0, 0.0]"},{name:"drop_path_rate",val:" = [0.0, 0.0, 0.1]"},{name:"qkv_bias",val:" = [True, True, True]"},{name:"cls_token",val:" = [False, False, True]"},{name:"qkv_projection_method",val:" = ['dw_bn', 'dw_bn', 'dw_bn']"},{name:"kernel_qkv",val:" = [3, 3, 3]"},{name:"padding_kv",val:" = [1, 1, 1]"},{name:"stride_kv",val:" = [2, 2, 2]"},{name:"padding_q",val:" = [1, 1, 1]"},{name:"stride_q",val:" = [1, 1, 1]"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CvtConfig.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.CvtConfig.patch_sizes",description:`<strong>patch_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[7, 3, 3]</code>) &#x2014;
The kernel size of each encoder&#x2019;s patch embedding.`,name:"patch_sizes"},{anchor:"transformers.CvtConfig.patch_stride",description:`<strong>patch_stride</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[4, 2, 2]</code>) &#x2014;
The stride size of each encoder&#x2019;s patch embedding.`,name:"patch_stride"},{anchor:"transformers.CvtConfig.patch_padding",description:`<strong>patch_padding</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 1, 1]</code>) &#x2014;
The padding size of each encoder&#x2019;s patch embedding.`,name:"patch_padding"},{anchor:"transformers.CvtConfig.embed_dim",description:`<strong>embed_dim</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[64, 192, 384]</code>) &#x2014;
Dimension of each of the encoder blocks.`,name:"embed_dim"},{anchor:"transformers.CvtConfig.num_heads",description:`<strong>num_heads</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 3, 6]</code>) &#x2014;
Number of attention heads for each attention layer in each block of the Transformer encoder.`,name:"num_heads"},{anchor:"transformers.CvtConfig.depth",description:`<strong>depth</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 2, 10]</code>) &#x2014;
The number of layers in each encoder block.`,name:"depth"},{anchor:"transformers.CvtConfig.mlp_ratios",description:`<strong>mlp_ratios</strong> (<code>List[float]</code>, <em>optional</em>, defaults to <code>[4.0, 4.0, 4.0, 4.0]</code>) &#x2014;
Ratio of the size of the hidden layer compared to the size of the input layer of the Mix FFNs in the
encoder blocks.`,name:"mlp_ratios"},{anchor:"transformers.CvtConfig.attention_drop_rate",description:`<strong>attention_drop_rate</strong> (<code>List[float]</code>, <em>optional</em>, defaults to <code>[0.0, 0.0, 0.0]</code>) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_drop_rate"},{anchor:"transformers.CvtConfig.drop_rate",description:`<strong>drop_rate</strong> (<code>List[float]</code>, <em>optional</em>, defaults to <code>[0.0, 0.0, 0.0]</code>) &#x2014;
The dropout ratio for the patch embeddings probabilities.`,name:"drop_rate"},{anchor:"transformers.CvtConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>List[float]</code>, <em>optional</em>, defaults to <code>[0.0, 0.0, 0.1]</code>) &#x2014;
The dropout probability for stochastic depth, used in the blocks of the Transformer encoder.`,name:"drop_path_rate"},{anchor:"transformers.CvtConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>List[bool]</code>, <em>optional</em>, defaults to <code>[True, True, True]</code>) &#x2014;
The bias bool for query, key and value in attentions`,name:"qkv_bias"},{anchor:"transformers.CvtConfig.cls_token",description:`<strong>cls_token</strong> (<code>List[bool]</code>, <em>optional</em>, defaults to <code>[False, False, True]</code>) &#x2014;
Whether or not to add a classification token to the output of each of the last 3 stages.`,name:"cls_token"},{anchor:"transformers.CvtConfig.qkv_projection_method",description:`<strong>qkv_projection_method</strong> (<code>List[string]</code>, <em>optional</em>, defaults to [&#x201C;dw_bn&#x201D;, &#x201C;dw_bn&#x201D;, &#x201C;dw_bn&#x201D;]\`) &#x2014;
The projection method for query, key and value Default is depth-wise convolutions with batch norm. For
Linear projection use &#x201C;avg&#x201D;.`,name:"qkv_projection_method"},{anchor:"transformers.CvtConfig.kernel_qkv",description:`<strong>kernel_qkv</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 3, 3]</code>) &#x2014;
The kernel size for query, key and value in attention layer`,name:"kernel_qkv"},{anchor:"transformers.CvtConfig.padding_kv",description:`<strong>padding_kv</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 1, 1]</code>) &#x2014;
The padding size for key and value in attention layer`,name:"padding_kv"},{anchor:"transformers.CvtConfig.stride_kv",description:`<strong>stride_kv</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 2, 2]</code>) &#x2014;
The stride size for key and value in attention layer`,name:"stride_kv"},{anchor:"transformers.CvtConfig.padding_q",description:`<strong>padding_q</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 1, 1]</code>) &#x2014;
The padding size for query in attention layer`,name:"padding_q"},{anchor:"transformers.CvtConfig.stride_q",description:`<strong>stride_q</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 1, 1]</code>) &#x2014;
The stride size for query in attention layer`,name:"stride_q"},{anchor:"transformers.CvtConfig.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.CvtConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-6) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cvt/configuration_cvt.py#L24"}}),d=new Ie({props:{anchor:"transformers.CvtConfig.example",$$slots:{default:[Ee]},$$scope:{ctx:k}}}),q=new Ve({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[tt],pytorch:[Se]},$$scope:{ctx:k}}}),X=new Pe({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/cvt.md"}}),{c(){e=f("meta"),m=r(),t=f("p"),s=r(),$(u.$$.fragment),n=r(),v=f("div"),v.innerHTML=O,_=r(),$(W.$$.fragment),pe=r(),V=f("p"),V.innerHTML=ye,fe=r(),U=f("p"),U.textContent=re,R=r(),N=f("p"),N.innerHTML=$e,ne=r(),Q=f("p"),Q.innerHTML=ue,P=r(),$(K.$$.fragment),F=r(),E=f("ul"),E.innerHTML=ie,ee=r(),$(I.$$.fragment),te=r(),Y=f("p"),Y.textContent=he,ve=r(),$(D.$$.fragment),le=r(),de=f("ul"),de.innerHTML=S,A=r(),ce=f("p"),ce.textContent=me,oe=r(),$(se.$$.fragment),Z=r(),L=f("div"),$(B.$$.fragment),ae=r(),p=f("p"),p.innerHTML=j,H=r(),z=f("p"),z.innerHTML=J,we=r(),$(d.$$.fragment),b=r(),$(q.$$.fragment),G=r(),$(X.$$.fragment),je=r(),xe=f("p"),this.h()},l(o){const g=He("svelte-u9bgzb",document.head);e=h(g,"META",{name:!0,content:!0}),g.forEach(a),m=i(o),t=h(o,"P",{}),Ce(t).forEach(a),s=i(o),T(u.$$.fragment,o),n=i(o),v=h(o,"DIV",{class:!0,"data-svelte-h":!0}),C(v)!=="svelte-ltwe0m"&&(v.innerHTML=O),_=i(o),T(W.$$.fragment,o),pe=i(o),V=h(o,"P",{"data-svelte-h":!0}),C(V)!=="svelte-1ijngll"&&(V.innerHTML=ye),fe=i(o),U=h(o,"P",{"data-svelte-h":!0}),C(U)!=="svelte-vfdo9a"&&(U.textContent=re),R=i(o),N=h(o,"P",{"data-svelte-h":!0}),C(N)!=="svelte-1j8nzd3"&&(N.innerHTML=$e),ne=i(o),Q=h(o,"P",{"data-svelte-h":!0}),C(Q)!=="svelte-bcvfwe"&&(Q.innerHTML=ue),P=i(o),T(K.$$.fragment,o),F=i(o),E=h(o,"UL",{"data-svelte-h":!0}),C(E)!=="svelte-lfpi8d"&&(E.innerHTML=ie),ee=i(o),T(I.$$.fragment,o),te=i(o),Y=h(o,"P",{"data-svelte-h":!0}),C(Y)!=="svelte-wslymy"&&(Y.textContent=he),ve=i(o),T(D.$$.fragment,o),le=i(o),de=h(o,"UL",{"data-svelte-h":!0}),C(de)!=="svelte-13qmfxg"&&(de.innerHTML=S),A=i(o),ce=h(o,"P",{"data-svelte-h":!0}),C(ce)!=="svelte-1xesile"&&(ce.textContent=me),oe=i(o),T(se.$$.fragment,o),Z=i(o),L=h(o,"DIV",{class:!0});var _e=Ce(L);T(B.$$.fragment,_e),ae=i(_e),p=h(_e,"P",{"data-svelte-h":!0}),C(p)!=="svelte-16ahiq"&&(p.innerHTML=j),H=i(_e),z=h(_e,"P",{"data-svelte-h":!0}),C(z)!=="svelte-o55m63"&&(z.innerHTML=J),we=i(_e),T(d.$$.fragment,_e),_e.forEach(a),b=i(o),T(q.$$.fragment,o),G=i(o),T(X.$$.fragment,o),je=i(o),xe=h(o,"P",{}),Ce(xe).forEach(a),this.h()},h(){ge(e,"name","hf:doc:metadata"),ge(e,"content",nt),ge(v,"class","flex flex-wrap space-x-1"),ge(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,g){c(document.head,e),l(o,m,g),l(o,t,g),l(o,s,g),M(u,o,g),l(o,n,g),l(o,v,g),l(o,_,g),M(W,o,g),l(o,pe,g),l(o,V,g),l(o,fe,g),l(o,U,g),l(o,R,g),l(o,N,g),l(o,ne,g),l(o,Q,g),l(o,P,g),M(K,o,g),l(o,F,g),l(o,E,g),l(o,ee,g),M(I,o,g),l(o,te,g),l(o,Y,g),l(o,ve,g),M(D,o,g),l(o,le,g),l(o,de,g),l(o,A,g),l(o,ce,g),l(o,oe,g),M(se,o,g),l(o,Z,g),l(o,L,g),M(B,L,null),c(L,ae),c(L,p),c(L,H),c(L,z),c(L,we),M(d,L,null),l(o,b,g),M(q,o,g),l(o,G,g),M(X,o,g),l(o,je,g),l(o,xe,g),ke=!0},p(o,[g]){const _e={};g&2&&(_e.$$scope={dirty:g,ctx:o}),d.$set(_e);const Ze={};g&2&&(Ze.$$scope={dirty:g,ctx:o}),q.$set(Ze)},i(o){ke||(y(u.$$.fragment,o),y(W.$$.fragment,o),y(K.$$.fragment,o),y(I.$$.fragment,o),y(D.$$.fragment,o),y(se.$$.fragment,o),y(B.$$.fragment,o),y(d.$$.fragment,o),y(q.$$.fragment,o),y(X.$$.fragment,o),ke=!0)},o(o){w(u.$$.fragment,o),w(W.$$.fragment,o),w(K.$$.fragment,o),w(I.$$.fragment,o),w(D.$$.fragment,o),w(se.$$.fragment,o),w(B.$$.fragment,o),w(d.$$.fragment,o),w(q.$$.fragment,o),w(X.$$.fragment,o),ke=!1},d(o){o&&(a(m),a(t),a(s),a(n),a(v),a(_),a(pe),a(V),a(fe),a(U),a(R),a(N),a(ne),a(Q),a(P),a(F),a(E),a(ee),a(te),a(Y),a(ve),a(le),a(de),a(A),a(ce),a(oe),a(Z),a(L),a(b),a(G),a(je),a(xe)),a(e),x(u,o),x(W,o),x(K,o),x(I,o),x(D,o),x(se,o),x(B),x(d),x(q,o),x(X,o)}}}const nt='{"title":"Convolutional Vision Transformer (CvT)","local":"convolutional-vision-transformer-cvt","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"CvtConfig","local":"transformers.CvtConfig","sections":[],"depth":2},{"title":"CvtModel","local":"transformers.CvtModel","sections":[],"depth":2},{"title":"CvtForImageClassification","local":"transformers.CvtForImageClassification","sections":[],"depth":2},{"title":"TFCvtModel","local":"transformers.TFCvtModel","sections":[],"depth":2},{"title":"TFCvtForImageClassification","local":"transformers.TFCvtForImageClassification","sections":[],"depth":2}],"depth":1}';function st(k){return ze(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gt extends Je{constructor(e){super(),Ne(this,e,st,ot,Le,{})}}export{gt as component};
