import{s as Cn,o as Mn,n as G}from"../chunks/scheduler.9bc65507.js";import{S as Tn,i as yn,g as c,s as i,r as _,A as $n,h as m,f as o,c as d,j as P,u as b,x as h,k as q,y as p,a as r,v as C,d as M,t as T,w as y}from"../chunks/index.707bf1b6.js";import{T as Qe}from"../chunks/Tip.c2ecdbf4.js";import{D as Y}from"../chunks/Docstring.17db21ae.js";import{C as Se}from"../chunks/CodeBlock.54a9f38d.js";import{E as Ye}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{P as wn}from"../chunks/PipelineTag.44585822.js";import{H as re}from"../chunks/Heading.342b1fa6.js";function jn($){let t,u="Example:",l,a,g;return a=new Se({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(){t=c("p"),t.textContent=u,l=i(),_(a.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=u),l=d(n),b(a.$$.fragment,n)},m(n,f){r(n,t,f),r(n,l,f),C(a,n,f),g=!0},p:G,i(n){g||(M(a.$$.fragment,n),g=!0)},o(n){T(a.$$.fragment,n),g=!1},d(n){n&&(o(t),o(l)),y(a,n)}}}function xn($){let t,u=`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(){t=c("p"),t.innerHTML=u},l(l){t=m(l,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=u)},m(l,a){r(l,t,a)},p:G,d(l){l&&o(t)}}}function Fn($){let t,u="Example:",l,a,g;return a=new Se({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEN2dE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZjdnQtMTMlMjIpJTBBbW9kZWwlMjAlM0QlMjBDdnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGY3Z0LTEzJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBbGlzdChsYXN0X2hpZGRlbl9zdGF0ZXMuc2hhcGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, CvtModel
<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;microsoft/cvt-13&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CvtModel.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>    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">384</span>, <span class="hljs-number">14</span>, <span class="hljs-number">14</span>]`,wrap:!1}}),{c(){t=c("p"),t.textContent=u,l=i(),_(a.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=u),l=d(n),b(a.$$.fragment,n)},m(n,f){r(n,t,f),r(n,l,f),C(a,n,f),g=!0},p:G,i(n){g||(M(a.$$.fragment,n),g=!0)},o(n){T(a.$$.fragment,n),g=!1},d(n){n&&(o(t),o(l)),y(a,n)}}}function kn($){let t,u=`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(){t=c("p"),t.innerHTML=u},l(l){t=m(l,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=u)},m(l,a){r(l,t,a)},p:G,d(l){l&&o(t)}}}function In($){let t,u="Example:",l,a,g;return a=new Se({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEN2dEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmN2dC0xMyUyMiklMEFtb2RlbCUyMCUzRCUyMEN2dEZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRmN2dC0xMyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpLml0ZW0oKSUwQXByaW50KG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9sYWJlbCU1RCk=",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>)
<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])
tabby, tabby cat`,wrap:!1}}),{c(){t=c("p"),t.textContent=u,l=i(),_(a.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=u),l=d(n),b(a.$$.fragment,n)},m(n,f){r(n,t,f),r(n,l,f),C(a,n,f),g=!0},p:G,i(n){g||(M(a.$$.fragment,n),g=!0)},o(n){T(a.$$.fragment,n),g=!1},d(n){n&&(o(t),o(l)),y(a,n)}}}function Un($){let t,u="TF 2.0 models accepts two formats as inputs:",l,a,g="<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,f,Q=`This second option is useful when using <code>tf.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(){t=c("p"),t.textContent=u,l=i(),a=c("ul"),a.innerHTML=g,n=i(),f=c("p"),f.innerHTML=Q},l(v){t=m(v,"P",{"data-svelte-h":!0}),h(t)!=="svelte-ha0dwg"&&(t.textContent=u),l=d(v),a=m(v,"UL",{"data-svelte-h":!0}),h(a)!=="svelte-1ar3osv"&&(a.innerHTML=g),n=d(v),f=m(v,"P",{"data-svelte-h":!0}),h(f)!=="svelte-wrmwvd"&&(f.innerHTML=Q)},m(v,k){r(v,t,k),r(v,l,k),r(v,a,k),r(v,n,k),r(v,f,k)},p:G,d(v){v&&(o(t),o(l),o(a),o(n),o(f))}}}function Zn($){let t,u=`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(){t=c("p"),t.innerHTML=u},l(l){t=m(l,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=u)},m(l,a){r(l,t,a)},p:G,d(l){l&&o(t)}}}function Jn($){let t,u="Examples:",l,a,g;return a=new Se({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(){t=c("p"),t.textContent=u,l=i(),_(a.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-kvfsh7"&&(t.textContent=u),l=d(n),b(a.$$.fragment,n)},m(n,f){r(n,t,f),r(n,l,f),C(a,n,f),g=!0},p:G,i(n){g||(M(a.$$.fragment,n),g=!0)},o(n){T(a.$$.fragment,n),g=!1},d(n){n&&(o(t),o(l)),y(a,n)}}}function Wn($){let t,u="TF 2.0 models accepts two formats as inputs:",l,a,g="<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,f,Q=`This second option is useful when using <code>tf.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(){t=c("p"),t.textContent=u,l=i(),a=c("ul"),a.innerHTML=g,n=i(),f=c("p"),f.innerHTML=Q},l(v){t=m(v,"P",{"data-svelte-h":!0}),h(t)!=="svelte-ha0dwg"&&(t.textContent=u),l=d(v),a=m(v,"UL",{"data-svelte-h":!0}),h(a)!=="svelte-1ar3osv"&&(a.innerHTML=g),n=d(v),f=m(v,"P",{"data-svelte-h":!0}),h(f)!=="svelte-wrmwvd"&&(f.innerHTML=Q)},m(v,k){r(v,t,k),r(v,l,k),r(v,a,k),r(v,n,k),r(v,f,k)},p:G,d(v){v&&(o(t),o(l),o(a),o(n),o(f))}}}function Nn($){let t,u=`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(){t=c("p"),t.innerHTML=u},l(l){t=m(l,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=u)},m(l,a){r(l,t,a)},p:G,d(l){l&&o(t)}}}function zn($){let t,u="Examples:",l,a,g;return a=new Se({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(){t=c("p"),t.textContent=u,l=i(),_(a.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-kvfsh7"&&(t.textContent=u),l=d(n),b(a.$$.fragment,n)},m(n,f){r(n,t,f),r(n,l,f),C(a,n,f),g=!0},p:G,i(n){g||(M(a.$$.fragment,n),g=!0)},o(n){T(a.$$.fragment,n),g=!1},d(n){n&&(o(t),o(l)),y(a,n)}}}function Ln($){let t,u,l,a,g,n,f,Q,v,k='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.',Ae,le,Yt="The abstract from the paper is the following:",De,ie,St=`<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>`,Oe,de,At="Tips:",Ke,ce,Dt=`<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>`,et,me,Ot='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>.',tt,pe,nt,fe,Kt="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with CvT.",ot,he,st,ge,en='<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>',at,ue,tn="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.",rt,ve,lt,I,_e,_t,Ue,nn=`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.`,bt,Ze,on=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ct,S,it,be,dt,z,Ce,Mt,Je,sn=`The bare Cvt Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Tt,Z,Me,yt,We,an='The <a href="/docs/transformers/main/en/model_doc/cvt#transformers.CvtModel">CvtModel</a> forward method, overrides the <code>__call__</code> special method.',$t,A,wt,D,ct,Te,mt,U,ye,jt,Ne,rn=`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.`,xt,ze,ln=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Ft,J,$e,kt,Le,dn='The <a href="/docs/transformers/main/en/model_doc/cvt#transformers.CvtForImageClassification">CvtForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',It,O,Ut,K,pt,we,ft,w,je,Zt,Ve,cn="The bare Cvt Model transformer outputting raw hidden-states without any specific head on top.",Jt,Re,mn=`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.)`,Wt,He,pn=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">tf.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.`,Nt,ee,zt,W,xe,Lt,Be,fn='The <a href="/docs/transformers/main/en/model_doc/cvt#transformers.TFCvtModel">TFCvtModel</a> forward method, overrides the <code>__call__</code> special method.',Vt,te,Rt,ne,ht,Fe,gt,j,ke,Ht,Ee,hn=`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.`,Bt,Pe,gn=`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.)`,Et,qe,un=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">tf.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.`,Pt,oe,qt,N,Ie,Gt,Ge,vn='The <a href="/docs/transformers/main/en/model_doc/cvt#transformers.TFCvtForImageClassification">TFCvtForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Qt,se,Xt,ae,ut,Xe,vt;return g=new re({props:{title:"Convolutional Vision Transformer (CvT)",local:"convolutional-vision-transformer-cvt",headingTag:"h1"}}),f=new re({props:{title:"Overview",local:"overview",headingTag:"h2"}}),pe=new re({props:{title:"Resources",local:"resources",headingTag:"h2"}}),he=new wn({props:{pipeline:"image-classification"}}),ve=new re({props:{title:"CvtConfig",local:"transformers.CvtConfig",headingTag:"h2"}}),_e=new Y({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#L29"}}),S=new Ye({props:{anchor:"transformers.CvtConfig.example",$$slots:{default:[jn]},$$scope:{ctx:$}}}),be=new re({props:{title:"CvtModel",local:"transformers.CvtModel",headingTag:"h2"}}),Ce=new Y({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.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.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#L590"}}),Me=new Y({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.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 <code>CvtImageProcessor.__call__</code>
for details.`,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#L605",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>
`}}),A=new Qe({props:{$$slots:{default:[xn]},$$scope:{ctx:$}}}),D=new Ye({props:{anchor:"transformers.CvtModel.forward.example",$$slots:{default:[Fn]},$$scope:{ctx:$}}}),Te=new re({props:{title:"CvtForImageClassification",local:"transformers.CvtForImageClassification",headingTag:"h2"}}),ye=new Y({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.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.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#L651"}}),$e=new Y({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.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 <code>CvtImageProcessor.__call__</code>
for details.`,name:"pixel_values"},{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"},{anchor:"transformers.CvtForImageClassification.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/cvt/modeling_cvt.py#L666",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>
`}}),O=new Qe({props:{$$slots:{default:[kn]},$$scope:{ctx:$}}}),K=new Ye({props:{anchor:"transformers.CvtForImageClassification.forward.example",$$slots:{default:[In]},$$scope:{ctx:$}}}),we=new re({props:{title:"TFCvtModel",local:"transformers.TFCvtModel",headingTag:"h2"}}),je=new Y({props:{name:"class transformers.TFCvtModel",anchor:"transformers.TFCvtModel",parameters:[{name:"*args",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#L762"}}),ee=new Qe({props:{$$slots:{default:[Un]},$$scope:{ctx:$}}}),xe=new Y({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#L768",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>
`}}),te=new Qe({props:{$$slots:{default:[Zn]},$$scope:{ctx:$}}}),ne=new Ye({props:{anchor:"transformers.TFCvtModel.call.example",$$slots:{default:[Jn]},$$scope:{ctx:$}}}),Fe=new re({props:{title:"TFCvtForImageClassification",local:"transformers.TFCvtForImageClassification",headingTag:"h2"}}),ke=new Y({props:{name:"class transformers.TFCvtForImageClassification",anchor:"transformers.TFCvtForImageClassification",parameters:[{name:"*args",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#L826"}}),oe=new Qe({props:{$$slots:{default:[Wn]},$$scope:{ctx:$}}}),Ie=new Y({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#L844",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>
`}}),se=new Qe({props:{$$slots:{default:[Nn]},$$scope:{ctx:$}}}),ae=new Ye({props:{anchor:"transformers.TFCvtForImageClassification.call.example",$$slots:{default:[zn]},$$scope:{ctx:$}}}),{c(){t=c("meta"),u=i(),l=c("p"),a=i(),_(g.$$.fragment),n=i(),_(f.$$.fragment),Q=i(),v=c("p"),v.innerHTML=k,Ae=i(),le=c("p"),le.textContent=Yt,De=i(),ie=c("p"),ie.innerHTML=St,Oe=i(),de=c("p"),de.textContent=At,Ke=i(),ce=c("ul"),ce.innerHTML=Dt,et=i(),me=c("p"),me.innerHTML=Ot,tt=i(),_(pe.$$.fragment),nt=i(),fe=c("p"),fe.textContent=Kt,ot=i(),_(he.$$.fragment),st=i(),ge=c("ul"),ge.innerHTML=en,at=i(),ue=c("p"),ue.textContent=tn,rt=i(),_(ve.$$.fragment),lt=i(),I=c("div"),_(_e.$$.fragment),_t=i(),Ue=c("p"),Ue.innerHTML=nn,bt=i(),Ze=c("p"),Ze.innerHTML=on,Ct=i(),_(S.$$.fragment),it=i(),_(be.$$.fragment),dt=i(),z=c("div"),_(Ce.$$.fragment),Mt=i(),Je=c("p"),Je.innerHTML=sn,Tt=i(),Z=c("div"),_(Me.$$.fragment),yt=i(),We=c("p"),We.innerHTML=an,$t=i(),_(A.$$.fragment),wt=i(),_(D.$$.fragment),ct=i(),_(Te.$$.fragment),mt=i(),U=c("div"),_(ye.$$.fragment),jt=i(),Ne=c("p"),Ne.textContent=rn,xt=i(),ze=c("p"),ze.innerHTML=ln,Ft=i(),J=c("div"),_($e.$$.fragment),kt=i(),Le=c("p"),Le.innerHTML=dn,It=i(),_(O.$$.fragment),Ut=i(),_(K.$$.fragment),pt=i(),_(we.$$.fragment),ft=i(),w=c("div"),_(je.$$.fragment),Zt=i(),Ve=c("p"),Ve.textContent=cn,Jt=i(),Re=c("p"),Re.innerHTML=mn,Wt=i(),He=c("p"),He.innerHTML=pn,Nt=i(),_(ee.$$.fragment),zt=i(),W=c("div"),_(xe.$$.fragment),Lt=i(),Be=c("p"),Be.innerHTML=fn,Vt=i(),_(te.$$.fragment),Rt=i(),_(ne.$$.fragment),ht=i(),_(Fe.$$.fragment),gt=i(),j=c("div"),_(ke.$$.fragment),Ht=i(),Ee=c("p"),Ee.textContent=hn,Bt=i(),Pe=c("p"),Pe.innerHTML=gn,Et=i(),qe=c("p"),qe.innerHTML=un,Pt=i(),_(oe.$$.fragment),qt=i(),N=c("div"),_(Ie.$$.fragment),Gt=i(),Ge=c("p"),Ge.innerHTML=vn,Qt=i(),_(se.$$.fragment),Xt=i(),_(ae.$$.fragment),ut=i(),Xe=c("p"),this.h()},l(e){const s=$n("svelte-u9bgzb",document.head);t=m(s,"META",{name:!0,content:!0}),s.forEach(o),u=d(e),l=m(e,"P",{}),P(l).forEach(o),a=d(e),b(g.$$.fragment,e),n=d(e),b(f.$$.fragment,e),Q=d(e),v=m(e,"P",{"data-svelte-h":!0}),h(v)!=="svelte-1ijngll"&&(v.innerHTML=k),Ae=d(e),le=m(e,"P",{"data-svelte-h":!0}),h(le)!=="svelte-vfdo9a"&&(le.textContent=Yt),De=d(e),ie=m(e,"P",{"data-svelte-h":!0}),h(ie)!=="svelte-1j8nzd3"&&(ie.innerHTML=St),Oe=d(e),de=m(e,"P",{"data-svelte-h":!0}),h(de)!=="svelte-axv494"&&(de.textContent=At),Ke=d(e),ce=m(e,"UL",{"data-svelte-h":!0}),h(ce)!=="svelte-lfpi8d"&&(ce.innerHTML=Dt),et=d(e),me=m(e,"P",{"data-svelte-h":!0}),h(me)!=="svelte-bcvfwe"&&(me.innerHTML=Ot),tt=d(e),b(pe.$$.fragment,e),nt=d(e),fe=m(e,"P",{"data-svelte-h":!0}),h(fe)!=="svelte-wslymy"&&(fe.textContent=Kt),ot=d(e),b(he.$$.fragment,e),st=d(e),ge=m(e,"UL",{"data-svelte-h":!0}),h(ge)!=="svelte-13qmfxg"&&(ge.innerHTML=en),at=d(e),ue=m(e,"P",{"data-svelte-h":!0}),h(ue)!=="svelte-1xesile"&&(ue.textContent=tn),rt=d(e),b(ve.$$.fragment,e),lt=d(e),I=m(e,"DIV",{class:!0});var L=P(I);b(_e.$$.fragment,L),_t=d(L),Ue=m(L,"P",{"data-svelte-h":!0}),h(Ue)!=="svelte-16ahiq"&&(Ue.innerHTML=nn),bt=d(L),Ze=m(L,"P",{"data-svelte-h":!0}),h(Ze)!=="svelte-o55m63"&&(Ze.innerHTML=on),Ct=d(L),b(S.$$.fragment,L),L.forEach(o),it=d(e),b(be.$$.fragment,e),dt=d(e),z=m(e,"DIV",{class:!0});var X=P(z);b(Ce.$$.fragment,X),Mt=d(X),Je=m(X,"P",{"data-svelte-h":!0}),h(Je)!=="svelte-1qa4t0c"&&(Je.innerHTML=sn),Tt=d(X),Z=m(X,"DIV",{class:!0});var V=P(Z);b(Me.$$.fragment,V),yt=d(V),We=m(V,"P",{"data-svelte-h":!0}),h(We)!=="svelte-1obn7s"&&(We.innerHTML=an),$t=d(V),b(A.$$.fragment,V),wt=d(V),b(D.$$.fragment,V),V.forEach(o),X.forEach(o),ct=d(e),b(Te.$$.fragment,e),mt=d(e),U=m(e,"DIV",{class:!0});var R=P(U);b(ye.$$.fragment,R),jt=d(R),Ne=m(R,"P",{"data-svelte-h":!0}),h(Ne)!=="svelte-ztj7cy"&&(Ne.textContent=rn),xt=d(R),ze=m(R,"P",{"data-svelte-h":!0}),h(ze)!=="svelte-1gjh92c"&&(ze.innerHTML=ln),Ft=d(R),J=m(R,"DIV",{class:!0});var H=P(J);b($e.$$.fragment,H),kt=d(H),Le=m(H,"P",{"data-svelte-h":!0}),h(Le)!=="svelte-1cosh7w"&&(Le.innerHTML=dn),It=d(H),b(O.$$.fragment,H),Ut=d(H),b(K.$$.fragment,H),H.forEach(o),R.forEach(o),pt=d(e),b(we.$$.fragment,e),ft=d(e),w=m(e,"DIV",{class:!0});var x=P(w);b(je.$$.fragment,x),Zt=d(x),Ve=m(x,"P",{"data-svelte-h":!0}),h(Ve)!=="svelte-5yjryq"&&(Ve.textContent=cn),Jt=d(x),Re=m(x,"P",{"data-svelte-h":!0}),h(Re)!=="svelte-1qaxm70"&&(Re.innerHTML=mn),Wt=d(x),He=m(x,"P",{"data-svelte-h":!0}),h(He)!=="svelte-1ivrf8m"&&(He.innerHTML=pn),Nt=d(x),b(ee.$$.fragment,x),zt=d(x),W=m(x,"DIV",{class:!0});var B=P(W);b(xe.$$.fragment,B),Lt=d(B),Be=m(B,"P",{"data-svelte-h":!0}),h(Be)!=="svelte-1nw9jz0"&&(Be.innerHTML=fn),Vt=d(B),b(te.$$.fragment,B),Rt=d(B),b(ne.$$.fragment,B),B.forEach(o),x.forEach(o),ht=d(e),b(Fe.$$.fragment,e),gt=d(e),j=m(e,"DIV",{class:!0});var F=P(j);b(ke.$$.fragment,F),Ht=d(F),Ee=m(F,"P",{"data-svelte-h":!0}),h(Ee)!=="svelte-ztj7cy"&&(Ee.textContent=hn),Bt=d(F),Pe=m(F,"P",{"data-svelte-h":!0}),h(Pe)!=="svelte-1qaxm70"&&(Pe.innerHTML=gn),Et=d(F),qe=m(F,"P",{"data-svelte-h":!0}),h(qe)!=="svelte-1ivrf8m"&&(qe.innerHTML=un),Pt=d(F),b(oe.$$.fragment,F),qt=d(F),N=m(F,"DIV",{class:!0});var E=P(N);b(Ie.$$.fragment,E),Gt=d(E),Ge=m(E,"P",{"data-svelte-h":!0}),h(Ge)!=="svelte-1u5lkz8"&&(Ge.innerHTML=vn),Qt=d(E),b(se.$$.fragment,E),Xt=d(E),b(ae.$$.fragment,E),E.forEach(o),F.forEach(o),ut=d(e),Xe=m(e,"P",{}),P(Xe).forEach(o),this.h()},h(){q(t,"name","hf:doc:metadata"),q(t,"content",Vn),q(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),q(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),q(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),q(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),q(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),q(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),q(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),q(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),q(j,"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,s){p(document.head,t),r(e,u,s),r(e,l,s),r(e,a,s),C(g,e,s),r(e,n,s),C(f,e,s),r(e,Q,s),r(e,v,s),r(e,Ae,s),r(e,le,s),r(e,De,s),r(e,ie,s),r(e,Oe,s),r(e,de,s),r(e,Ke,s),r(e,ce,s),r(e,et,s),r(e,me,s),r(e,tt,s),C(pe,e,s),r(e,nt,s),r(e,fe,s),r(e,ot,s),C(he,e,s),r(e,st,s),r(e,ge,s),r(e,at,s),r(e,ue,s),r(e,rt,s),C(ve,e,s),r(e,lt,s),r(e,I,s),C(_e,I,null),p(I,_t),p(I,Ue),p(I,bt),p(I,Ze),p(I,Ct),C(S,I,null),r(e,it,s),C(be,e,s),r(e,dt,s),r(e,z,s),C(Ce,z,null),p(z,Mt),p(z,Je),p(z,Tt),p(z,Z),C(Me,Z,null),p(Z,yt),p(Z,We),p(Z,$t),C(A,Z,null),p(Z,wt),C(D,Z,null),r(e,ct,s),C(Te,e,s),r(e,mt,s),r(e,U,s),C(ye,U,null),p(U,jt),p(U,Ne),p(U,xt),p(U,ze),p(U,Ft),p(U,J),C($e,J,null),p(J,kt),p(J,Le),p(J,It),C(O,J,null),p(J,Ut),C(K,J,null),r(e,pt,s),C(we,e,s),r(e,ft,s),r(e,w,s),C(je,w,null),p(w,Zt),p(w,Ve),p(w,Jt),p(w,Re),p(w,Wt),p(w,He),p(w,Nt),C(ee,w,null),p(w,zt),p(w,W),C(xe,W,null),p(W,Lt),p(W,Be),p(W,Vt),C(te,W,null),p(W,Rt),C(ne,W,null),r(e,ht,s),C(Fe,e,s),r(e,gt,s),r(e,j,s),C(ke,j,null),p(j,Ht),p(j,Ee),p(j,Bt),p(j,Pe),p(j,Et),p(j,qe),p(j,Pt),C(oe,j,null),p(j,qt),p(j,N),C(Ie,N,null),p(N,Gt),p(N,Ge),p(N,Qt),C(se,N,null),p(N,Xt),C(ae,N,null),r(e,ut,s),r(e,Xe,s),vt=!0},p(e,[s]){const L={};s&2&&(L.$$scope={dirty:s,ctx:e}),S.$set(L);const X={};s&2&&(X.$$scope={dirty:s,ctx:e}),A.$set(X);const V={};s&2&&(V.$$scope={dirty:s,ctx:e}),D.$set(V);const R={};s&2&&(R.$$scope={dirty:s,ctx:e}),O.$set(R);const H={};s&2&&(H.$$scope={dirty:s,ctx:e}),K.$set(H);const x={};s&2&&(x.$$scope={dirty:s,ctx:e}),ee.$set(x);const B={};s&2&&(B.$$scope={dirty:s,ctx:e}),te.$set(B);const F={};s&2&&(F.$$scope={dirty:s,ctx:e}),ne.$set(F);const E={};s&2&&(E.$$scope={dirty:s,ctx:e}),oe.$set(E);const _n={};s&2&&(_n.$$scope={dirty:s,ctx:e}),se.$set(_n);const bn={};s&2&&(bn.$$scope={dirty:s,ctx:e}),ae.$set(bn)},i(e){vt||(M(g.$$.fragment,e),M(f.$$.fragment,e),M(pe.$$.fragment,e),M(he.$$.fragment,e),M(ve.$$.fragment,e),M(_e.$$.fragment,e),M(S.$$.fragment,e),M(be.$$.fragment,e),M(Ce.$$.fragment,e),M(Me.$$.fragment,e),M(A.$$.fragment,e),M(D.$$.fragment,e),M(Te.$$.fragment,e),M(ye.$$.fragment,e),M($e.$$.fragment,e),M(O.$$.fragment,e),M(K.$$.fragment,e),M(we.$$.fragment,e),M(je.$$.fragment,e),M(ee.$$.fragment,e),M(xe.$$.fragment,e),M(te.$$.fragment,e),M(ne.$$.fragment,e),M(Fe.$$.fragment,e),M(ke.$$.fragment,e),M(oe.$$.fragment,e),M(Ie.$$.fragment,e),M(se.$$.fragment,e),M(ae.$$.fragment,e),vt=!0)},o(e){T(g.$$.fragment,e),T(f.$$.fragment,e),T(pe.$$.fragment,e),T(he.$$.fragment,e),T(ve.$$.fragment,e),T(_e.$$.fragment,e),T(S.$$.fragment,e),T(be.$$.fragment,e),T(Ce.$$.fragment,e),T(Me.$$.fragment,e),T(A.$$.fragment,e),T(D.$$.fragment,e),T(Te.$$.fragment,e),T(ye.$$.fragment,e),T($e.$$.fragment,e),T(O.$$.fragment,e),T(K.$$.fragment,e),T(we.$$.fragment,e),T(je.$$.fragment,e),T(ee.$$.fragment,e),T(xe.$$.fragment,e),T(te.$$.fragment,e),T(ne.$$.fragment,e),T(Fe.$$.fragment,e),T(ke.$$.fragment,e),T(oe.$$.fragment,e),T(Ie.$$.fragment,e),T(se.$$.fragment,e),T(ae.$$.fragment,e),vt=!1},d(e){e&&(o(u),o(l),o(a),o(n),o(Q),o(v),o(Ae),o(le),o(De),o(ie),o(Oe),o(de),o(Ke),o(ce),o(et),o(me),o(tt),o(nt),o(fe),o(ot),o(st),o(ge),o(at),o(ue),o(rt),o(lt),o(I),o(it),o(dt),o(z),o(ct),o(mt),o(U),o(pt),o(ft),o(w),o(ht),o(gt),o(j),o(ut),o(Xe)),o(t),y(g,e),y(f,e),y(pe,e),y(he,e),y(ve,e),y(_e),y(S),y(be,e),y(Ce),y(Me),y(A),y(D),y(Te,e),y(ye),y($e),y(O),y(K),y(we,e),y(je),y(ee),y(xe),y(te),y(ne),y(Fe,e),y(ke),y(oe),y(Ie),y(se),y(ae)}}}const Vn='{"title":"Convolutional Vision Transformer (CvT)","local":"convolutional-vision-transformer-cvt","sections":[{"title":"Overview","local":"overview","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 Rn($){return Mn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yn extends Tn{constructor(t){super(),yn(this,t,Rn,Ln,Cn,{})}}export{Yn as component};
