Buckets:

rtrm's picture
download
raw
65.4 kB
import{s as bn,f as yn,o as Mn,n as S}from"../chunks/scheduler.25b97de1.js";import{S as Cn,i as xn,g as c,s as l,r as _,A as Tn,h as m,f as o,c as i,j as Q,u as b,x as h,k as J,y as f,a,v as y,d as M,t as C,w as x}from"../chunks/index.d9030fc9.js";import{T as Ae}from"../chunks/Tip.baa67368.js";import{D as ee}from"../chunks/Docstring.e257edda.js";import{C as Ke}from"../chunks/CodeBlock.e6cd0d95.js";import{E as Oe}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{P as $n}from"../chunks/PipelineTag.5f100392.js";import{H as fe,E as wn}from"../chunks/EditOnGithub.91d95064.js";function Nn(T){let t,v="Example:",d,r,g;return r=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENvbnZOZVhUVjJDb25maWclMkMlMjBDb252TmV4dFYyTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ29udk5lWFRWMiUyMGNvbnZuZXh0djItdGlueS0xay0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ29udk5lWFRWMkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBjb252bmV4dHYyLXRpbnktMWstMjI0JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBDb252TmV4dFYyTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ConvNeXTV2Config, ConvNextV2Model
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ConvNeXTV2 convnextv2-tiny-1k-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ConvNeXTV2Config()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the convnextv2-tiny-1k-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvNextV2Model(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=v,d=l(),_(r.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=v),d=i(n),b(r.$$.fragment,n)},m(n,u){a(n,t,u),a(n,d,u),y(r,n,u),g=!0},p:S,i(n){g||(M(r.$$.fragment,n),g=!0)},o(n){C(r.$$.fragment,n),g=!1},d(n){n&&(o(t),o(d)),x(r,n)}}}function jn(T){let t,v=`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=v},l(d){t=m(d,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=v)},m(d,r){a(d,t,r)},p:S,d(d){d&&o(t)}}}function Vn(T){let t,v="Example:",d,r,g;return r=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMENvbnZOZXh0VjJNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZjb252bmV4dHYyLXRpbnktMWstMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwQ29udk5leHRWMk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmNvbnZuZXh0djItdGlueS0xay0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ConvNextV2Model
<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;facebook/convnextv2-tiny-1k-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvNextV2Model.from_pretrained(<span class="hljs-string">&quot;facebook/convnextv2-tiny-1k-224&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">768</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`,wrap:!1}}),{c(){t=c("p"),t.textContent=v,d=l(),_(r.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=v),d=i(n),b(r.$$.fragment,n)},m(n,u){a(n,t,u),a(n,d,u),y(r,n,u),g=!0},p:S,i(n){g||(M(r.$$.fragment,n),g=!0)},o(n){C(r.$$.fragment,n),g=!1},d(n){n&&(o(t),o(d)),x(r,n)}}}function Fn(T){let t,v=`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=v},l(d){t=m(d,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=v)},m(d,r){a(d,t,r)},p:S,d(d){d&&o(t)}}}function In(T){let t,v="Example:",d,r,g;return r=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMENvbnZOZXh0VjJGb3JJbWFnZUNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmNvbnZuZXh0djItdGlueS0xay0yMjQlMjIpJTBBbW9kZWwlMjAlM0QlMjBDb252TmV4dFYyRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZjb252bmV4dHYyLXRpbnktMWstMjI0JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ConvNextV2ForImageClassification
<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;facebook/convnextv2-tiny-1k-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvNextV2ForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/convnextv2-tiny-1k-224&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=v,d=l(),_(r.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=v),d=i(n),b(r.$$.fragment,n)},m(n,u){a(n,t,u),a(n,d,u),y(r,n,u),g=!0},p:S,i(n){g||(M(r.$$.fragment,n),g=!0)},o(n){C(r.$$.fragment,n),g=!1},d(n){n&&(o(t),o(d)),x(r,n)}}}function kn(T){let t,v="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",d,r,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 argument.</li>",n,u,A=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,j,w,D=`<li>a single Tensor with <code>pixel_values</code> only and nothing else: <code>model(pixel_values)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([pixel_values, attention_mask])</code> or <code>model([pixel_values, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;pixel_values&quot;: pixel_values, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,V,N,O=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){t=c("p"),t.innerHTML=v,d=l(),r=c("ul"),r.innerHTML=g,n=l(),u=c("p"),u.innerHTML=A,j=l(),w=c("ul"),w.innerHTML=D,V=l(),N=c("p"),N.innerHTML=O},l(p){t=m(p,"P",{"data-svelte-h":!0}),h(t)!=="svelte-1ajbfxg"&&(t.innerHTML=v),d=i(p),r=m(p,"UL",{"data-svelte-h":!0}),h(r)!=="svelte-qm1t26"&&(r.innerHTML=g),n=i(p),u=m(p,"P",{"data-svelte-h":!0}),h(u)!=="svelte-1v9qsc5"&&(u.innerHTML=A),j=i(p),w=m(p,"UL",{"data-svelte-h":!0}),h(w)!=="svelte-99h8aq"&&(w.innerHTML=D),V=i(p),N=m(p,"P",{"data-svelte-h":!0}),h(N)!=="svelte-1an3odd"&&(N.innerHTML=O)},m(p,$){a(p,t,$),a(p,d,$),a(p,r,$),a(p,n,$),a(p,u,$),a(p,j,$),a(p,w,$),a(p,V,$),a(p,N,$)},p:S,d(p){p&&(o(t),o(d),o(r),o(n),o(u),o(j),o(w),o(V),o(N))}}}function Jn(T){let t,v=`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=v},l(d){t=m(d,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=v)},m(d,r){a(d,t,r)},p:S,d(d){d&&o(t)}}}function Zn(T){let t,v="Example:",d,r,g;return r=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGQ29udk5leHRWMk1vZGVsJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZjb252bmV4dHYyLXRpbnktMWstMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZDb252TmV4dFYyTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGY29udm5leHR2Mi10aW55LTFrLTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBbGlzdChsYXN0X2hpZGRlbl9zdGF0ZXMuc2hhcGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFConvNextV2Model
<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;facebook/convnextv2-tiny-1k-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFConvNextV2Model.from_pretrained(<span class="hljs-string">&quot;facebook/convnextv2-tiny-1k-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(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
<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">768</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`,wrap:!1}}),{c(){t=c("p"),t.textContent=v,d=l(),_(r.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=v),d=i(n),b(r.$$.fragment,n)},m(n,u){a(n,t,u),a(n,d,u),y(r,n,u),g=!0},p:S,i(n){g||(M(r.$$.fragment,n),g=!0)},o(n){C(r.$$.fragment,n),g=!1},d(n){n&&(o(t),o(d)),x(r,n)}}}function Un(T){let t,v="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",d,r,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 argument.</li>",n,u,A=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,j,w,D=`<li>a single Tensor with <code>pixel_values</code> only and nothing else: <code>model(pixel_values)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([pixel_values, attention_mask])</code> or <code>model([pixel_values, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;pixel_values&quot;: pixel_values, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,V,N,O=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){t=c("p"),t.innerHTML=v,d=l(),r=c("ul"),r.innerHTML=g,n=l(),u=c("p"),u.innerHTML=A,j=l(),w=c("ul"),w.innerHTML=D,V=l(),N=c("p"),N.innerHTML=O},l(p){t=m(p,"P",{"data-svelte-h":!0}),h(t)!=="svelte-1ajbfxg"&&(t.innerHTML=v),d=i(p),r=m(p,"UL",{"data-svelte-h":!0}),h(r)!=="svelte-qm1t26"&&(r.innerHTML=g),n=i(p),u=m(p,"P",{"data-svelte-h":!0}),h(u)!=="svelte-1v9qsc5"&&(u.innerHTML=A),j=i(p),w=m(p,"UL",{"data-svelte-h":!0}),h(w)!=="svelte-99h8aq"&&(w.innerHTML=D),V=i(p),N=m(p,"P",{"data-svelte-h":!0}),h(N)!=="svelte-1an3odd"&&(N.innerHTML=O)},m(p,$){a(p,t,$),a(p,d,$),a(p,r,$),a(p,n,$),a(p,u,$),a(p,j,$),a(p,w,$),a(p,V,$),a(p,N,$)},p:S,d(p){p&&(o(t),o(d),o(r),o(n),o(u),o(j),o(w),o(V),o(N))}}}function Wn(T){let t,v=`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=v},l(d){t=m(d,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=v)},m(d,r){a(d,t,r)},p:S,d(d){d&&o(t)}}}function Hn(T){let t,v="Example:",d,r,g;return r=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGQ29udk5leHRWMkZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGY29udm5leHR2Mi10aW55LTFrLTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQ29udk5leHRWMkZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGY29udm5leHR2Mi10aW55LTFrLTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSkpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFConvNextV2ForImageClassification
<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> 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;facebook/convnextv2-tiny-1k-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFConvNextV2ForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/convnextv2-tiny-1k-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </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 = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>))
<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=v,d=l(),_(r.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=v),d=i(n),b(r.$$.fragment,n)},m(n,u){a(n,t,u),a(n,d,u),y(r,n,u),g=!0},p:S,i(n){g||(M(r.$$.fragment,n),g=!0)},o(n){C(r.$$.fragment,n),g=!1},d(n){n&&(o(t),o(d)),x(r,n)}}}function Rn(T){let t,v,d,r,g,n,u,A,j,w=`The ConvNeXt V2 model was proposed in <a href="https://arxiv.org/abs/2301.00808" rel="nofollow">ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders</a> by Sanghyun Woo, Shoubhik Debnath, Ronghang Hu, Xinlei Chen, Zhuang Liu, In So Kweon, Saining Xie.
ConvNeXt V2 is a pure convolutional model (ConvNet), inspired by the design of Vision Transformers, and a successor of <a href="convnext">ConvNeXT</a>.`,D,V,N="The abstract from the paper is the following:",O,p,$="<em>Driven by improved architectures and better representation learning frameworks, the field of visual recognition has enjoyed rapid modernization and performance boost in the early 2020s. For example, modern ConvNets, represented by ConvNeXt, have demonstrated strong performance in various scenarios. While these models were originally designed for supervised learning with ImageNet labels, they can also potentially benefit from self-supervised learning techniques such as masked autoencoders (MAE). However, we found that simply combining these two approaches leads to subpar performance. In this paper, we propose a fully convolutional masked autoencoder framework and a new Global Response Normalization (GRN) layer that can be added to the ConvNeXt architecture to enhance inter-channel feature competition. This co-design of self-supervised learning techniques and architectural improvement results in a new model family called ConvNeXt V2, which significantly improves the performance of pure ConvNets on various recognition benchmarks, including ImageNet classification, COCO detection, and ADE20K segmentation. We also provide pre-trained ConvNeXt V2 models of various sizes, ranging from an efficient 3.7M-parameter Atto model with 76.7% top-1 accuracy on ImageNet, to a 650M Huge model that achieves a state-of-the-art 88.9% accuracy using only public training data.</em>",et,te,At,tt,ue,Dt='ConvNeXt V2 architecture. Taken from the <a href="https://arxiv.org/abs/2301.00808">original paper</a>.',nt,he,Ot='This model was contributed by <a href="https://huggingface.co/adirik" rel="nofollow">adirik</a>. The original code can be found <a href="https://github.com/facebookresearch/ConvNeXt-V2" rel="nofollow">here</a>.',ot,ge,st,ve,Kt="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ConvNeXt V2.",at,_e,rt,be,en='<li><a href="/docs/transformers/pr_31842/en/model_doc/convnextv2#transformers.ConvNextV2ForImageClassification">ConvNextV2ForImageClassification</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>',lt,ye,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.",it,Me,dt,Z,Ce,Mt,We,nn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_31842/en/model_doc/convnextv2#transformers.ConvNextV2Model">ConvNextV2Model</a>. It is used to instantiate an
ConvNeXTV2 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 ConvNeXTV2
<a href="https://huggingface.co/facebook/convnextv2-tiny-1k-224" rel="nofollow">facebook/convnextv2-tiny-1k-224</a> architecture.`,Ct,He,on=`Configuration objects inherit from <a href="/docs/transformers/pr_31842/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/pr_31842/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,xt,ne,ct,xe,mt,z,Te,Tt,Re,sn=`The bare ConvNextV2 model outputting raw features 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.`,$t,H,$e,wt,Ge,an='The <a href="/docs/transformers/pr_31842/en/model_doc/convnextv2#transformers.ConvNextV2Model">ConvNextV2Model</a> forward method, overrides the <code>__call__</code> special method.',Nt,oe,jt,se,pt,we,ft,U,Ne,Vt,Be,rn=`ConvNextV2 Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,Ft,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.`,It,R,je,kt,Xe,dn='The <a href="/docs/transformers/pr_31842/en/model_doc/convnextv2#transformers.ConvNextV2ForImageClassification">ConvNextV2ForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Jt,ae,Zt,re,ut,Ve,ht,I,Fe,Ut,Le,cn=`The bare ConvNextV2 model outputting raw features without any specific head on top.
This model inherits from <a href="/docs/transformers/pr_31842/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,Pe,mn=`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.`,Ht,le,Rt,G,Ie,Gt,Ee,pn='The <a href="/docs/transformers/pr_31842/en/model_doc/convnextv2#transformers.TFConvNextV2Model">TFConvNextV2Model</a> forward method, overrides the <code>__call__</code> special method.',Bt,ie,zt,de,gt,ke,vt,F,Je,Xt,qe,fn=`ConvNextV2 Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,Lt,Ye,un=`This model inherits from <a href="/docs/transformers/pr_31842/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.)`,Pt,Qe,hn=`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.`,Et,ce,qt,B,Ze,Yt,Se,gn='The <a href="/docs/transformers/pr_31842/en/model_doc/convnextv2#transformers.TFConvNextV2ForImageClassification">TFConvNextV2ForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Qt,me,St,pe,_t,Ue,bt,De,yt;return g=new fe({props:{title:"ConvNeXt V2",local:"convnext-v2",headingTag:"h1"}}),u=new fe({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ge=new fe({props:{title:"Resources",local:"resources",headingTag:"h2"}}),_e=new $n({props:{pipeline:"image-classification"}}),Me=new fe({props:{title:"ConvNextV2Config",local:"transformers.ConvNextV2Config",headingTag:"h2"}}),Ce=new ee({props:{name:"class transformers.ConvNextV2Config",anchor:"transformers.ConvNextV2Config",parameters:[{name:"num_channels",val:" = 3"},{name:"patch_size",val:" = 4"},{name:"num_stages",val:" = 4"},{name:"hidden_sizes",val:" = None"},{name:"depths",val:" = None"},{name:"hidden_act",val:" = 'gelu'"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"drop_path_rate",val:" = 0.0"},{name:"image_size",val:" = 224"},{name:"out_features",val:" = None"},{name:"out_indices",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvNextV2Config.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.ConvNextV2Config.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, optional, defaults to 4) &#x2014;
Patch size to use in the patch embedding layer.`,name:"patch_size"},{anchor:"transformers.ConvNextV2Config.num_stages",description:`<strong>num_stages</strong> (<code>int</code>, optional, defaults to 4) &#x2014;
The number of stages in the model.`,name:"num_stages"},{anchor:"transformers.ConvNextV2Config.hidden_sizes",description:`<strong>hidden_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[96, 192, 384, 768]</code>) &#x2014;
Dimensionality (hidden size) at each stage.`,name:"hidden_sizes"},{anchor:"transformers.ConvNextV2Config.depths",description:`<strong>depths</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 3, 9, 3]</code>) &#x2014;
Depth (number of blocks) for each stage.`,name:"depths"},{anchor:"transformers.ConvNextV2Config.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in each block. If string, <code>&quot;gelu&quot;</code>, <code>&quot;relu&quot;</code>,
<code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.ConvNextV2Config.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.ConvNextV2Config.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.ConvNextV2Config.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The drop rate for stochastic depth.`,name:"drop_path_rate"},{anchor:"transformers.ConvNextV2Config.out_features",description:`<strong>out_features</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
If used as backbone, list of features to output. Can be any of <code>&quot;stem&quot;</code>, <code>&quot;stage1&quot;</code>, <code>&quot;stage2&quot;</code>, etc.
(depending on how many stages the model has). If unset and <code>out_indices</code> is set, will default to the
corresponding stages. If unset and <code>out_indices</code> is unset, will default to the last stage. Must be in the
same order as defined in the <code>stage_names</code> attribute.`,name:"out_features"},{anchor:"transformers.ConvNextV2Config.out_indices",description:`<strong>out_indices</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
If used as backbone, list of indices of features to output. Can be any of 0, 1, 2, etc. (depending on how
many stages the model has). If unset and <code>out_features</code> is set, will default to the corresponding stages.
If unset and <code>out_features</code> is unset, will default to the last stage. Must be in the
same order as defined in the <code>stage_names</code> attribute.`,name:"out_indices"}],source:"https://github.com/huggingface/transformers/blob/vr_31842/src/transformers/models/convnextv2/configuration_convnextv2.py#L25"}}),ne=new Oe({props:{anchor:"transformers.ConvNextV2Config.example",$$slots:{default:[Nn]},$$scope:{ctx:T}}}),xe=new fe({props:{title:"ConvNextV2Model",local:"transformers.ConvNextV2Model",headingTag:"h2"}}),Te=new ee({props:{name:"class transformers.ConvNextV2Model",anchor:"transformers.ConvNextV2Model",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ConvNextV2Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31842/en/model_doc/convnextv2#transformers.ConvNextV2Config">ConvNextV2Config</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/pr_31842/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/vr_31842/src/transformers/models/convnextv2/modeling_convnextv2.py#L339"}}),$e=new ee({props:{name:"forward",anchor:"transformers.ConvNextV2Model.forward",parameters:[{name:"pixel_values",val:": FloatTensor = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ConvNextV2Model.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/pr_31842/en/model_doc/convnext#transformers.ConvNextImageProcessor">ConvNextImageProcessor</a>. See
<a href="/docs/transformers/pr_31842/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.ConvNextV2Model.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.ConvNextV2Model.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/pr_31842/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31842/src/transformers/models/convnextv2/modeling_convnextv2.py#L358",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>A <code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</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/pr_31842/en/model_doc/convnextv2#transformers.ConvNextV2Config"
>ConvNextV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state after a pooling operation on the spatial dimensions.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, num_channels, height, width)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>
<p><code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),oe=new Ae({props:{$$slots:{default:[jn]},$$scope:{ctx:T}}}),se=new Oe({props:{anchor:"transformers.ConvNextV2Model.forward.example",$$slots:{default:[Vn]},$$scope:{ctx:T}}}),we=new fe({props:{title:"ConvNextV2ForImageClassification",local:"transformers.ConvNextV2ForImageClassification",headingTag:"h2"}}),Ne=new ee({props:{name:"class transformers.ConvNextV2ForImageClassification",anchor:"transformers.ConvNextV2ForImageClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ConvNextV2ForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31842/en/model_doc/convnextv2#transformers.ConvNextV2Config">ConvNextV2Config</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/pr_31842/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/vr_31842/src/transformers/models/convnextv2/modeling_convnextv2.py#L403"}}),je=new ee({props:{name:"forward",anchor:"transformers.ConvNextV2ForImageClassification.forward",parameters:[{name:"pixel_values",val:": FloatTensor = None"},{name:"labels",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ConvNextV2ForImageClassification.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/pr_31842/en/model_doc/convnext#transformers.ConvNextImageProcessor">ConvNextImageProcessor</a>. See
<a href="/docs/transformers/pr_31842/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.ConvNextV2ForImageClassification.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.ConvNextV2ForImageClassification.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/pr_31842/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ConvNextV2ForImageClassification.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/vr_31842/src/transformers/models/convnextv2/modeling_convnextv2.py#L426",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>A <a
href="/docs/transformers/pr_31842/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/pr_31842/en/model_doc/convnextv2#transformers.ConvNextV2Config"
>ConvNextV2Config</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/pr_31842/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ae=new Ae({props:{$$slots:{default:[Fn]},$$scope:{ctx:T}}}),re=new Oe({props:{anchor:"transformers.ConvNextV2ForImageClassification.forward.example",$$slots:{default:[In]},$$scope:{ctx:T}}}),Ve=new fe({props:{title:"TFConvNextV2Model",local:"transformers.TFConvNextV2Model",headingTag:"h2"}}),Fe=new ee({props:{name:"class transformers.TFConvNextV2Model",anchor:"transformers.TFConvNextV2Model",parameters:[{name:"config",val:": ConvNextV2Config"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFConvNextV2Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31842/en/model_doc/convnextv2#transformers.ConvNextV2Config">ConvNextV2Config</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/pr_31842/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/vr_31842/src/transformers/models/convnextv2/modeling_tf_convnextv2.py#L539"}}),le=new Ae({props:{$$slots:{default:[kn]},$$scope:{ctx:T}}}),Ie=new ee({props:{name:"call",anchor:"transformers.TFConvNextV2Model.call",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFConvNextV2Model.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/pr_31842/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_31842/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFConvNextV2Model.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.TFConvNextV2Model.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/pr_31842/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 <code>True</code>.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31842/src/transformers/models/convnextv2/modeling_tf_convnextv2.py#L548",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>A <code>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndNoAttention</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/pr_31842/en/model_doc/convnextv2#transformers.ConvNextV2Config"
>ConvNextV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state after a pooling operation on the spatial dimensions.</p>
</li>
<li>
<p><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 layer) of shape <code>(batch_size, num_channels, height, width)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>
<p><code>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(tf.Tensor)</code></p>
`}}),ie=new Ae({props:{$$slots:{default:[Jn]},$$scope:{ctx:T}}}),de=new Oe({props:{anchor:"transformers.TFConvNextV2Model.call.example",$$slots:{default:[Zn]},$$scope:{ctx:T}}}),ke=new fe({props:{title:"TFConvNextV2ForImageClassification",local:"transformers.TFConvNextV2ForImageClassification",headingTag:"h2"}}),Je=new ee({props:{name:"class transformers.TFConvNextV2ForImageClassification",anchor:"transformers.TFConvNextV2ForImageClassification",parameters:[{name:"config",val:": ConvNextV2Config"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFConvNextV2ForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31842/en/model_doc/convnextv2#transformers.ConvNextV2Config">ConvNextV2Config</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/pr_31842/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/vr_31842/src/transformers/models/convnextv2/modeling_tf_convnextv2.py#L597"}}),ce=new Ae({props:{$$slots:{default:[Un]},$$scope:{ctx:T}}}),Ze=new ee({props:{name:"call",anchor:"transformers.TFConvNextV2ForImageClassification.call",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFConvNextV2ForImageClassification.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/pr_31842/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_31842/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFConvNextV2ForImageClassification.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.TFConvNextV2ForImageClassification.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/pr_31842/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 <code>True</code>.`,name:"return_dict"},{anchor:"transformers.TFConvNextV2ForImageClassification.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/vr_31842/src/transformers/models/convnextv2/modeling_tf_convnextv2.py#L619",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/pr_31842/en/model_doc/convnextv2#transformers.ConvNextV2Config"
>ConvNextV2Config</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>
`}}),me=new Ae({props:{$$slots:{default:[Wn]},$$scope:{ctx:T}}}),pe=new Oe({props:{anchor:"transformers.TFConvNextV2ForImageClassification.call.example",$$slots:{default:[Hn]},$$scope:{ctx:T}}}),Ue=new wn({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/convnextv2.md"}}),{c(){t=c("meta"),v=l(),d=c("p"),r=l(),_(g.$$.fragment),n=l(),_(u.$$.fragment),A=l(),j=c("p"),j.innerHTML=w,D=l(),V=c("p"),V.textContent=N,O=l(),p=c("p"),p.innerHTML=$,et=l(),te=c("img"),tt=l(),ue=c("small"),ue.innerHTML=Dt,nt=l(),he=c("p"),he.innerHTML=Ot,ot=l(),_(ge.$$.fragment),st=l(),ve=c("p"),ve.textContent=Kt,at=l(),_(_e.$$.fragment),rt=l(),be=c("ul"),be.innerHTML=en,lt=l(),ye=c("p"),ye.textContent=tn,it=l(),_(Me.$$.fragment),dt=l(),Z=c("div"),_(Ce.$$.fragment),Mt=l(),We=c("p"),We.innerHTML=nn,Ct=l(),He=c("p"),He.innerHTML=on,xt=l(),_(ne.$$.fragment),ct=l(),_(xe.$$.fragment),mt=l(),z=c("div"),_(Te.$$.fragment),Tt=l(),Re=c("p"),Re.innerHTML=sn,$t=l(),H=c("div"),_($e.$$.fragment),wt=l(),Ge=c("p"),Ge.innerHTML=an,Nt=l(),_(oe.$$.fragment),jt=l(),_(se.$$.fragment),pt=l(),_(we.$$.fragment),ft=l(),U=c("div"),_(Ne.$$.fragment),Vt=l(),Be=c("p"),Be.textContent=rn,Ft=l(),ze=c("p"),ze.innerHTML=ln,It=l(),R=c("div"),_(je.$$.fragment),kt=l(),Xe=c("p"),Xe.innerHTML=dn,Jt=l(),_(ae.$$.fragment),Zt=l(),_(re.$$.fragment),ut=l(),_(Ve.$$.fragment),ht=l(),I=c("div"),_(Fe.$$.fragment),Ut=l(),Le=c("p"),Le.innerHTML=cn,Wt=l(),Pe=c("p"),Pe.innerHTML=mn,Ht=l(),_(le.$$.fragment),Rt=l(),G=c("div"),_(Ie.$$.fragment),Gt=l(),Ee=c("p"),Ee.innerHTML=pn,Bt=l(),_(ie.$$.fragment),zt=l(),_(de.$$.fragment),gt=l(),_(ke.$$.fragment),vt=l(),F=c("div"),_(Je.$$.fragment),Xt=l(),qe=c("p"),qe.textContent=fn,Lt=l(),Ye=c("p"),Ye.innerHTML=un,Pt=l(),Qe=c("p"),Qe.innerHTML=hn,Et=l(),_(ce.$$.fragment),qt=l(),B=c("div"),_(Ze.$$.fragment),Yt=l(),Se=c("p"),Se.innerHTML=gn,Qt=l(),_(me.$$.fragment),St=l(),_(pe.$$.fragment),_t=l(),_(Ue.$$.fragment),bt=l(),De=c("p"),this.h()},l(e){const s=Tn("svelte-u9bgzb",document.head);t=m(s,"META",{name:!0,content:!0}),s.forEach(o),v=i(e),d=m(e,"P",{}),Q(d).forEach(o),r=i(e),b(g.$$.fragment,e),n=i(e),b(u.$$.fragment,e),A=i(e),j=m(e,"P",{"data-svelte-h":!0}),h(j)!=="svelte-wq6ps0"&&(j.innerHTML=w),D=i(e),V=m(e,"P",{"data-svelte-h":!0}),h(V)!=="svelte-vfdo9a"&&(V.textContent=N),O=i(e),p=m(e,"P",{"data-svelte-h":!0}),h(p)!=="svelte-9q4js6"&&(p.innerHTML=$),et=i(e),te=m(e,"IMG",{src:!0,alt:!0,width:!0}),tt=i(e),ue=m(e,"SMALL",{"data-svelte-h":!0}),h(ue)!=="svelte-10q852d"&&(ue.innerHTML=Dt),nt=i(e),he=m(e,"P",{"data-svelte-h":!0}),h(he)!=="svelte-kiq3o2"&&(he.innerHTML=Ot),ot=i(e),b(ge.$$.fragment,e),st=i(e),ve=m(e,"P",{"data-svelte-h":!0}),h(ve)!=="svelte-16akdts"&&(ve.textContent=Kt),at=i(e),b(_e.$$.fragment,e),rt=i(e),be=m(e,"UL",{"data-svelte-h":!0}),h(be)!=="svelte-otlxq6"&&(be.innerHTML=en),lt=i(e),ye=m(e,"P",{"data-svelte-h":!0}),h(ye)!=="svelte-1xesile"&&(ye.textContent=tn),it=i(e),b(Me.$$.fragment,e),dt=i(e),Z=m(e,"DIV",{class:!0});var X=Q(Z);b(Ce.$$.fragment,X),Mt=i(X),We=m(X,"P",{"data-svelte-h":!0}),h(We)!=="svelte-1ry0gay"&&(We.innerHTML=nn),Ct=i(X),He=m(X,"P",{"data-svelte-h":!0}),h(He)!=="svelte-z0xa5b"&&(He.innerHTML=on),xt=i(X),b(ne.$$.fragment,X),X.forEach(o),ct=i(e),b(xe.$$.fragment,e),mt=i(e),z=m(e,"DIV",{class:!0});var K=Q(z);b(Te.$$.fragment,K),Tt=i(K),Re=m(K,"P",{"data-svelte-h":!0}),h(Re)!=="svelte-vxpmpx"&&(Re.innerHTML=sn),$t=i(K),H=m(K,"DIV",{class:!0});var L=Q(H);b($e.$$.fragment,L),wt=i(L),Ge=m(L,"P",{"data-svelte-h":!0}),h(Ge)!=="svelte-i3osus"&&(Ge.innerHTML=an),Nt=i(L),b(oe.$$.fragment,L),jt=i(L),b(se.$$.fragment,L),L.forEach(o),K.forEach(o),pt=i(e),b(we.$$.fragment,e),ft=i(e),U=m(e,"DIV",{class:!0});var P=Q(U);b(Ne.$$.fragment,P),Vt=i(P),Be=m(P,"P",{"data-svelte-h":!0}),h(Be)!=="svelte-14zttn9"&&(Be.textContent=rn),Ft=i(P),ze=m(P,"P",{"data-svelte-h":!0}),h(ze)!=="svelte-1gjh92c"&&(ze.innerHTML=ln),It=i(P),R=m(P,"DIV",{class:!0});var E=Q(R);b(je.$$.fragment,E),kt=i(E),Xe=m(E,"P",{"data-svelte-h":!0}),h(Xe)!=="svelte-m9q7u"&&(Xe.innerHTML=dn),Jt=i(E),b(ae.$$.fragment,E),Zt=i(E),b(re.$$.fragment,E),E.forEach(o),P.forEach(o),ut=i(e),b(Ve.$$.fragment,e),ht=i(e),I=m(e,"DIV",{class:!0});var W=Q(I);b(Fe.$$.fragment,W),Ut=i(W),Le=m(W,"P",{"data-svelte-h":!0}),h(Le)!=="svelte-ca6ymb"&&(Le.innerHTML=cn),Wt=i(W),Pe=m(W,"P",{"data-svelte-h":!0}),h(Pe)!=="svelte-1be7e3c"&&(Pe.innerHTML=mn),Ht=i(W),b(le.$$.fragment,W),Rt=i(W),G=m(W,"DIV",{class:!0});var q=Q(G);b(Ie.$$.fragment,q),Gt=i(q),Ee=m(q,"P",{"data-svelte-h":!0}),h(Ee)!=="svelte-atvx9w"&&(Ee.innerHTML=pn),Bt=i(q),b(ie.$$.fragment,q),zt=i(q),b(de.$$.fragment,q),q.forEach(o),W.forEach(o),gt=i(e),b(ke.$$.fragment,e),vt=i(e),F=m(e,"DIV",{class:!0});var k=Q(F);b(Je.$$.fragment,k),Xt=i(k),qe=m(k,"P",{"data-svelte-h":!0}),h(qe)!=="svelte-14zttn9"&&(qe.textContent=fn),Lt=i(k),Ye=m(k,"P",{"data-svelte-h":!0}),h(Ye)!=="svelte-1kqxdl6"&&(Ye.innerHTML=un),Pt=i(k),Qe=m(k,"P",{"data-svelte-h":!0}),h(Qe)!=="svelte-1be7e3c"&&(Qe.innerHTML=hn),Et=i(k),b(ce.$$.fragment,k),qt=i(k),B=m(k,"DIV",{class:!0});var Y=Q(B);b(Ze.$$.fragment,Y),Yt=i(Y),Se=m(Y,"P",{"data-svelte-h":!0}),h(Se)!=="svelte-1c360dq"&&(Se.innerHTML=gn),Qt=i(Y),b(me.$$.fragment,Y),St=i(Y),b(pe.$$.fragment,Y),Y.forEach(o),k.forEach(o),_t=i(e),b(Ue.$$.fragment,e),bt=i(e),De=m(e,"P",{}),Q(De).forEach(o),this.h()},h(){J(t,"name","hf:doc:metadata"),J(t,"content",Gn),yn(te.src,At="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/convnextv2_architecture.png")||J(te,"src",At),J(te,"alt","drawing"),J(te,"width","600"),J(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(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(e,s){f(document.head,t),a(e,v,s),a(e,d,s),a(e,r,s),y(g,e,s),a(e,n,s),y(u,e,s),a(e,A,s),a(e,j,s),a(e,D,s),a(e,V,s),a(e,O,s),a(e,p,s),a(e,et,s),a(e,te,s),a(e,tt,s),a(e,ue,s),a(e,nt,s),a(e,he,s),a(e,ot,s),y(ge,e,s),a(e,st,s),a(e,ve,s),a(e,at,s),y(_e,e,s),a(e,rt,s),a(e,be,s),a(e,lt,s),a(e,ye,s),a(e,it,s),y(Me,e,s),a(e,dt,s),a(e,Z,s),y(Ce,Z,null),f(Z,Mt),f(Z,We),f(Z,Ct),f(Z,He),f(Z,xt),y(ne,Z,null),a(e,ct,s),y(xe,e,s),a(e,mt,s),a(e,z,s),y(Te,z,null),f(z,Tt),f(z,Re),f(z,$t),f(z,H),y($e,H,null),f(H,wt),f(H,Ge),f(H,Nt),y(oe,H,null),f(H,jt),y(se,H,null),a(e,pt,s),y(we,e,s),a(e,ft,s),a(e,U,s),y(Ne,U,null),f(U,Vt),f(U,Be),f(U,Ft),f(U,ze),f(U,It),f(U,R),y(je,R,null),f(R,kt),f(R,Xe),f(R,Jt),y(ae,R,null),f(R,Zt),y(re,R,null),a(e,ut,s),y(Ve,e,s),a(e,ht,s),a(e,I,s),y(Fe,I,null),f(I,Ut),f(I,Le),f(I,Wt),f(I,Pe),f(I,Ht),y(le,I,null),f(I,Rt),f(I,G),y(Ie,G,null),f(G,Gt),f(G,Ee),f(G,Bt),y(ie,G,null),f(G,zt),y(de,G,null),a(e,gt,s),y(ke,e,s),a(e,vt,s),a(e,F,s),y(Je,F,null),f(F,Xt),f(F,qe),f(F,Lt),f(F,Ye),f(F,Pt),f(F,Qe),f(F,Et),y(ce,F,null),f(F,qt),f(F,B),y(Ze,B,null),f(B,Yt),f(B,Se),f(B,Qt),y(me,B,null),f(B,St),y(pe,B,null),a(e,_t,s),y(Ue,e,s),a(e,bt,s),a(e,De,s),yt=!0},p(e,[s]){const X={};s&2&&(X.$$scope={dirty:s,ctx:e}),ne.$set(X);const K={};s&2&&(K.$$scope={dirty:s,ctx:e}),oe.$set(K);const L={};s&2&&(L.$$scope={dirty:s,ctx:e}),se.$set(L);const P={};s&2&&(P.$$scope={dirty:s,ctx:e}),ae.$set(P);const E={};s&2&&(E.$$scope={dirty:s,ctx:e}),re.$set(E);const W={};s&2&&(W.$$scope={dirty:s,ctx:e}),le.$set(W);const q={};s&2&&(q.$$scope={dirty:s,ctx:e}),ie.$set(q);const k={};s&2&&(k.$$scope={dirty:s,ctx:e}),de.$set(k);const Y={};s&2&&(Y.$$scope={dirty:s,ctx:e}),ce.$set(Y);const vn={};s&2&&(vn.$$scope={dirty:s,ctx:e}),me.$set(vn);const _n={};s&2&&(_n.$$scope={dirty:s,ctx:e}),pe.$set(_n)},i(e){yt||(M(g.$$.fragment,e),M(u.$$.fragment,e),M(ge.$$.fragment,e),M(_e.$$.fragment,e),M(Me.$$.fragment,e),M(Ce.$$.fragment,e),M(ne.$$.fragment,e),M(xe.$$.fragment,e),M(Te.$$.fragment,e),M($e.$$.fragment,e),M(oe.$$.fragment,e),M(se.$$.fragment,e),M(we.$$.fragment,e),M(Ne.$$.fragment,e),M(je.$$.fragment,e),M(ae.$$.fragment,e),M(re.$$.fragment,e),M(Ve.$$.fragment,e),M(Fe.$$.fragment,e),M(le.$$.fragment,e),M(Ie.$$.fragment,e),M(ie.$$.fragment,e),M(de.$$.fragment,e),M(ke.$$.fragment,e),M(Je.$$.fragment,e),M(ce.$$.fragment,e),M(Ze.$$.fragment,e),M(me.$$.fragment,e),M(pe.$$.fragment,e),M(Ue.$$.fragment,e),yt=!0)},o(e){C(g.$$.fragment,e),C(u.$$.fragment,e),C(ge.$$.fragment,e),C(_e.$$.fragment,e),C(Me.$$.fragment,e),C(Ce.$$.fragment,e),C(ne.$$.fragment,e),C(xe.$$.fragment,e),C(Te.$$.fragment,e),C($e.$$.fragment,e),C(oe.$$.fragment,e),C(se.$$.fragment,e),C(we.$$.fragment,e),C(Ne.$$.fragment,e),C(je.$$.fragment,e),C(ae.$$.fragment,e),C(re.$$.fragment,e),C(Ve.$$.fragment,e),C(Fe.$$.fragment,e),C(le.$$.fragment,e),C(Ie.$$.fragment,e),C(ie.$$.fragment,e),C(de.$$.fragment,e),C(ke.$$.fragment,e),C(Je.$$.fragment,e),C(ce.$$.fragment,e),C(Ze.$$.fragment,e),C(me.$$.fragment,e),C(pe.$$.fragment,e),C(Ue.$$.fragment,e),yt=!1},d(e){e&&(o(v),o(d),o(r),o(n),o(A),o(j),o(D),o(V),o(O),o(p),o(et),o(te),o(tt),o(ue),o(nt),o(he),o(ot),o(st),o(ve),o(at),o(rt),o(be),o(lt),o(ye),o(it),o(dt),o(Z),o(ct),o(mt),o(z),o(pt),o(ft),o(U),o(ut),o(ht),o(I),o(gt),o(vt),o(F),o(_t),o(bt),o(De)),o(t),x(g,e),x(u,e),x(ge,e),x(_e,e),x(Me,e),x(Ce),x(ne),x(xe,e),x(Te),x($e),x(oe),x(se),x(we,e),x(Ne),x(je),x(ae),x(re),x(Ve,e),x(Fe),x(le),x(Ie),x(ie),x(de),x(ke,e),x(Je),x(ce),x(Ze),x(me),x(pe),x(Ue,e)}}}const Gn='{"title":"ConvNeXt V2","local":"convnext-v2","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"ConvNextV2Config","local":"transformers.ConvNextV2Config","sections":[],"depth":2},{"title":"ConvNextV2Model","local":"transformers.ConvNextV2Model","sections":[],"depth":2},{"title":"ConvNextV2ForImageClassification","local":"transformers.ConvNextV2ForImageClassification","sections":[],"depth":2},{"title":"TFConvNextV2Model","local":"transformers.TFConvNextV2Model","sections":[],"depth":2},{"title":"TFConvNextV2ForImageClassification","local":"transformers.TFConvNextV2ForImageClassification","sections":[],"depth":2}],"depth":1}';function Bn(T){return Mn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Sn extends Cn{constructor(t){super(),xn(this,t,Bn,Rn,bn,{})}}export{Sn as component};

Xet Storage Details

Size:
65.4 kB
·
Xet hash:
de42a68427e2cac18f7a39398af1a91aa76b89cc3725daf0378d97da9f85ef00

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.