import{s as Yt,o as Ot,n as B}from"../chunks/scheduler.25b97de1.js";import{S as Dt,i as Kt,g as c,s as i,r as u,A as eo,h as f,f as s,c as l,j as P,u as g,x as h,k as V,y as m,a as d,v as _,d as w,t as b,w as v}from"../chunks/index.d9030fc9.js";import{T as Re}from"../chunks/Tip.baa67368.js";import{D as E}from"../chunks/Docstring.e257edda.js";import{C as Ut}from"../chunks/CodeBlock.e6cd0d95.js";import{E as It}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as $e,E as to}from"../chunks/EditOnGithub.91d95064.js";function oo(T){let t,p="Example:",n,a,$;return a=new Ut({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFN3aWZ0Rm9ybWVyQ29uZmlnJTJDJTIwU3dpZnRGb3JtZXJNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBTd2lmdEZvcm1lciUyMHN3aWZ0Zm9ybWVyLWJhc2UtcGF0Y2gxNi0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwU3dpZnRGb3JtZXJDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwc3dpZnRmb3JtZXItYmFzZS1wYXRjaDE2LTIyNCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwU3dpZnRGb3JtZXJNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SwiftFormerConfig, SwiftFormerModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a SwiftFormer swiftformer-base-patch16-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = SwiftFormerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the swiftformer-base-patch16-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SwiftFormerModel(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=p,n=i(),u(a.$$.fragment)},l(o){t=f(o,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=p),n=l(o),g(a.$$.fragment,o)},m(o,F){d(o,t,F),d(o,n,F),_(a,o,F),$=!0},p:B,i(o){$||(w(a.$$.fragment,o),$=!0)},o(o){b(a.$$.fragment,o),$=!1},d(o){o&&(s(t),s(n)),v(a,o)}}}function ro(T){let t,p=`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=p},l(n){t=f(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(n,a){d(n,t,a)},p:B,d(n){n&&s(t)}}}function so(T){let t,p="Example:",n,a,$;return a=new Ut({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFN3aWZ0Rm9ybWVyTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMk1CWlVBSSUyRnN3aWZ0Zm9ybWVyLXhzJTIyKSUwQW1vZGVsJTIwJTNEJTIwU3dpZnRGb3JtZXJNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyTUJaVUFJJTJGc3dpZnRmb3JtZXIteHMlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, SwiftFormerModel
<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;MBZUAI/swiftformer-xs&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SwiftFormerModel.from_pretrained(<span class="hljs-string">&quot;MBZUAI/swiftformer-xs&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">220</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`,wrap:!1}}),{c(){t=c("p"),t.textContent=p,n=i(),u(a.$$.fragment)},l(o){t=f(o,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=p),n=l(o),g(a.$$.fragment,o)},m(o,F){d(o,t,F),d(o,n,F),_(a,o,F),$=!0},p:B,i(o){$||(w(a.$$.fragment,o),$=!0)},o(o){b(a.$$.fragment,o),$=!1},d(o){o&&(s(t),s(n)),v(a,o)}}}function no(T){let t,p=`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=p},l(n){t=f(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(n,a){d(n,t,a)},p:B,d(n){n&&s(t)}}}function ao(T){let t,p="Example:",n,a,$;return a=new Ut({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFN3aWZ0Rm9ybWVyRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyTUJaVUFJJTJGc3dpZnRmb3JtZXIteHMlMjIpJTBBbW9kZWwlMjAlM0QlMjBTd2lmdEZvcm1lckZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMk1CWlVBSSUyRnN3aWZ0Zm9ybWVyLXhzJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, SwiftFormerForImageClassification
<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;MBZUAI/swiftformer-xs&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SwiftFormerForImageClassification.from_pretrained(<span class="hljs-string">&quot;MBZUAI/swiftformer-xs&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=p,n=i(),u(a.$$.fragment)},l(o){t=f(o,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=p),n=l(o),g(a.$$.fragment,o)},m(o,F){d(o,t,F),d(o,n,F),_(a,o,F),$=!0},p:B,i(o){$||(w(a.$$.fragment,o),$=!0)},o(o){b(a.$$.fragment,o),$=!1},d(o){o&&(s(t),s(n)),v(a,o)}}}function io(T){let t,p="TF 2.0 models accepts two formats as inputs:",n,a,$=`<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.
This second option is useful when using <code>keras.Model.fit</code> method which currently requires having all the
tensors in the first argument of the model call function: <code>model(inputs)</code>.
If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :</li> <li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, 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;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`;return{c(){t=c("p"),t.textContent=p,n=i(),a=c("ul"),a.innerHTML=$},l(o){t=f(o,"P",{"data-svelte-h":!0}),h(t)!=="svelte-ha0dwg"&&(t.textContent=p),n=l(o),a=f(o,"UL",{"data-svelte-h":!0}),h(a)!=="svelte-mgv7bm"&&(a.innerHTML=$)},m(o,F){d(o,t,F),d(o,n,F),d(o,a,F)},p:B,d(o){o&&(s(t),s(n),s(a))}}}function lo(T){let t,p=`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=p},l(n){t=f(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(n,a){d(n,t,a)},p:B,d(n){n&&s(t)}}}function mo(T){let t,p="TF 2.0 models accepts two formats as inputs:",n,a,$=`<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.
This second option is useful when using <code>keras.Model.fit</code> method which currently requires having all the
tensors in the first argument of the model call function: <code>model(inputs)</code>.
If you choose this second option, there are three possibilities you can use to gather all the input Tensors in the
first positional argument :</li> <li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, 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;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`;return{c(){t=c("p"),t.textContent=p,n=i(),a=c("ul"),a.innerHTML=$},l(o){t=f(o,"P",{"data-svelte-h":!0}),h(t)!=="svelte-ha0dwg"&&(t.textContent=p),n=l(o),a=f(o,"UL",{"data-svelte-h":!0}),h(a)!=="svelte-mgv7bm"&&(a.innerHTML=$)},m(o,F){d(o,t,F),d(o,n,F),d(o,a,F)},p:B,d(o){o&&(s(t),s(n),s(a))}}}function co(T){let t,p=`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=p},l(n){t=f(n,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(n,a){d(n,t,a)},p:B,d(n){n&&s(t)}}}function fo(T){let t,p,n,a,$,o,F,Ve,te,jt='The SwiftFormer model was proposed in <a href="https://arxiv.org/abs/2303.15446" rel="nofollow">SwiftFormer: Efficient Additive Attention for Transformer-based Real-time Mobile Vision Applications</a> by Abdelrahman Shaker, Muhammad Maaz, Hanoona Rasheed, Salman Khan, Ming-Hsuan Yang, Fahad Shahbaz Khan.',He,oe,Jt="The SwiftFormer paper introduces a novel efficient additive attention mechanism that effectively replaces the quadratic matrix multiplication operations in the self-attention computation with linear element-wise multiplications. A series of models called ‘SwiftFormer’ is built based on this, which achieves state-of-the-art performance in terms of both accuracy and mobile inference speed. Even their small variant achieves 78.5% top-1 ImageNet1K accuracy with only 0.8 ms latency on iPhone 14, which is more accurate and 2× faster compared to MobileViT-v2.",Ne,re,Zt="The abstract from the paper is the following:",ze,se,Wt="<em>Self-attention has become a defacto choice for capturing global context in various vision applications. However, its quadratic computational complexity with respect to image resolution limits its use in real-time applications, especially for deployment on resource-constrained mobile devices. Although hybrid approaches have been proposed to combine the advantages of convolutions and self-attention for a better speed-accuracy trade-off, the expensive matrix multiplication operations in self-attention remain a bottleneck. In this work, we introduce a novel efficient additive attention mechanism that effectively replaces the quadratic matrix multiplication operations with linear element-wise multiplications. Our design shows that the key-value interaction can be replaced with a linear layer without sacrificing any accuracy. Unlike previous state-of-the-art methods, our efficient formulation of self-attention enables its usage at all stages of the network. Using our proposed efficient additive attention, we build a series of models called “SwiftFormer” which achieves state-of-the-art performance in terms of both accuracy and mobile inference speed. Our small variant achieves 78.5% top-1 ImageNet-1K accuracy with only 0.8 ms latency on iPhone 14, which is more accurate and 2x faster compared to MobileViT-v2.</em>",Le,ne,kt=`This model was contributed by <a href="https://huggingface.co/shehan97" rel="nofollow">shehan97</a>. The TensorFlow version was contributed by <a href="https://huggingface.co/joaocmd" rel="nofollow">joaocmd</a>.
The original code can be found <a href="https://github.com/Amshaker/SwiftFormer" rel="nofollow">here</a>.`,Ge,ae,Ee,S,ie,ot,Fe,Rt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30910/en/model_doc/swiftformer#transformers.SwiftFormerModel">SwiftFormerModel</a>. It is used to instantiate an
SwiftFormer 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 SwiftFormer
<a href="https://huggingface.co/MBZUAI/swiftformer-xs" rel="nofollow">MBZUAI/swiftformer-xs</a> architecture.`,rt,Te,Pt=`Configuration objects inherit from <a href="/docs/transformers/pr_30910/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_30910/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,st,X,Be,le,Xe,J,de,nt,ye,Vt=`The bare SwiftFormer 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.`,at,U,me,it,Me,Ht='The <a href="/docs/transformers/pr_30910/en/model_doc/swiftformer#transformers.SwiftFormerModel">SwiftFormerModel</a> forward method, overrides the <code>__call__</code> special method.',lt,q,dt,Q,qe,ce,Qe,x,fe,mt,Ce,Nt="SwiftFormer Model transformer with an image classification head on top (e.g. for ImageNet).",ct,Se,zt=`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,pe,pt,xe,Lt='The <a href="/docs/transformers/pr_30910/en/model_doc/swiftformer#transformers.SwiftFormerForImageClassification">SwiftFormerForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',ht,A,ut,Y,Ae,he,Ye,M,ue,gt,Ie,Gt=`The bare TFSwiftFormer Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/pr_30910/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.)`,_t,Ue,Et=`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.`,wt,O,bt,H,ge,vt,je,Bt='The <a href="/docs/transformers/pr_30910/en/model_doc/swiftformer#transformers.TFSwiftFormerModel">TFSwiftFormerModel</a> forward method, overrides the <code>__call__</code> special method.',$t,D,Oe,_e,De,y,we,Ft,Je,Xt="TFSwiftFormer Model transformer with an image classification head on top (e.g. for ImageNet).",Tt,Ze,qt=`This model inherits from <a href="/docs/transformers/pr_30910/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.)`,yt,We,Qt=`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.`,Mt,K,Ct,N,be,St,ke,At='The <a href="/docs/transformers/pr_30910/en/model_doc/swiftformer#transformers.TFSwiftFormerForImageClassification">TFSwiftFormerForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',xt,ee,Ke,ve,et,Pe,tt;return $=new $e({props:{title:"SwiftFormer",local:"swiftformer",headingTag:"h1"}}),F=new $e({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ae=new $e({props:{title:"SwiftFormerConfig",local:"transformers.SwiftFormerConfig",headingTag:"h2"}}),ie=new E({props:{name:"class transformers.SwiftFormerConfig",anchor:"transformers.SwiftFormerConfig",parameters:[{name:"image_size",val:" = 224"},{name:"num_channels",val:" = 3"},{name:"depths",val:" = [3, 3, 6, 4]"},{name:"embed_dims",val:" = [48, 56, 112, 220]"},{name:"mlp_ratio",val:" = 4"},{name:"downsamples",val:" = [True, True, True, True]"},{name:"hidden_act",val:" = 'gelu'"},{name:"down_patch_size",val:" = 3"},{name:"down_stride",val:" = 2"},{name:"down_pad",val:" = 1"},{name:"drop_path_rate",val:" = 0.0"},{name:"drop_mlp_rate",val:" = 0.0"},{name:"drop_conv_encoder_rate",val:" = 0.0"},{name:"use_layer_scale",val:" = True"},{name:"layer_scale_init_value",val:" = 1e-05"},{name:"batch_norm_eps",val:" = 1e-05"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SwiftFormerConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image`,name:"image_size"},{anchor:"transformers.SwiftFormerConfig.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.SwiftFormerConfig.depths",description:`<strong>depths</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 3, 6, 4]</code>) &#x2014;
Depth of each stage`,name:"depths"},{anchor:"transformers.SwiftFormerConfig.embed_dims",description:`<strong>embed_dims</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[48, 56, 112, 220]</code>) &#x2014;
The embedding dimension at each stage`,name:"embed_dims"},{anchor:"transformers.SwiftFormerConfig.mlp_ratio",description:`<strong>mlp_ratio</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Ratio of size of the hidden dimensionality of an MLP to the dimensionality of its input.`,name:"mlp_ratio"},{anchor:"transformers.SwiftFormerConfig.downsamples",description:`<strong>downsamples</strong> (<code>List[bool]</code>, <em>optional</em>, defaults to <code>[True, True, True, True]</code>) &#x2014;
Whether or not to downsample inputs between two stages.`,name:"downsamples"},{anchor:"transformers.SwiftFormerConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (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.SwiftFormerConfig.down_patch_size",description:`<strong>down_patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The size of patches in downsampling layers.`,name:"down_patch_size"},{anchor:"transformers.SwiftFormerConfig.down_stride",description:`<strong>down_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The stride of convolution kernels in downsampling layers.`,name:"down_stride"},{anchor:"transformers.SwiftFormerConfig.down_pad",description:`<strong>down_pad</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Padding in downsampling layers.`,name:"down_pad"},{anchor:"transformers.SwiftFormerConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Rate at which to increase dropout probability in DropPath.`,name:"drop_path_rate"},{anchor:"transformers.SwiftFormerConfig.drop_mlp_rate",description:`<strong>drop_mlp_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Dropout rate for the MLP component of SwiftFormer.`,name:"drop_mlp_rate"},{anchor:"transformers.SwiftFormerConfig.drop_conv_encoder_rate",description:`<strong>drop_conv_encoder_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Dropout rate for the ConvEncoder component of SwiftFormer.`,name:"drop_conv_encoder_rate"},{anchor:"transformers.SwiftFormerConfig.use_layer_scale",description:`<strong>use_layer_scale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to scale outputs from token mixers.`,name:"use_layer_scale"},{anchor:"transformers.SwiftFormerConfig.layer_scale_init_value",description:`<strong>layer_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
Factor by which outputs from token mixers are scaled.`,name:"layer_scale_init_value"},{anchor:"transformers.SwiftFormerConfig.batch_norm_eps",description:`<strong>batch_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon used by the batch normalization layers.`,name:"batch_norm_eps"}],source:"https://github.com/huggingface/transformers/blob/vr_30910/src/transformers/models/swiftformer/configuration_swiftformer.py#L30"}}),X=new It({props:{anchor:"transformers.SwiftFormerConfig.example",$$slots:{default:[oo]},$$scope:{ctx:T}}}),le=new $e({props:{title:"SwiftFormerModel",local:"transformers.SwiftFormerModel",headingTag:"h2"}}),de=new E({props:{name:"class transformers.SwiftFormerModel",anchor:"transformers.SwiftFormerModel",parameters:[{name:"config",val:": SwiftFormerConfig"}],parametersDescription:[{anchor:"transformers.SwiftFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30910/en/model_doc/swiftformer#transformers.SwiftFormerConfig">SwiftFormerConfig</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_30910/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_30910/src/transformers/models/swiftformer/modeling_swiftformer.py#L456"}}),me=new E({props:{name:"forward",anchor:"transformers.SwiftFormerModel.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SwiftFormerModel.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_30910/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_30910/en/model_doc/levit#transformers.LevitFeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.SwiftFormerModel.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.SwiftFormerModel.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_30910/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_30910/src/transformers/models/swiftformer/modeling_swiftformer.py#L471",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.modeling_outputs.BaseModelOutputWithNoAttention</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_30910/en/model_doc/swiftformer#transformers.SwiftFormerConfig"
>SwiftFormerConfig</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>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.BaseModelOutputWithNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),q=new Re({props:{$$slots:{default:[ro]},$$scope:{ctx:T}}}),Q=new It({props:{anchor:"transformers.SwiftFormerModel.forward.example",$$slots:{default:[so]},$$scope:{ctx:T}}}),ce=new $e({props:{title:"SwiftFormerForImageClassification",local:"transformers.SwiftFormerForImageClassification",headingTag:"h2"}}),fe=new E({props:{name:"class transformers.SwiftFormerForImageClassification",anchor:"transformers.SwiftFormerForImageClassification",parameters:[{name:"config",val:": SwiftFormerConfig"}],parametersDescription:[{anchor:"transformers.SwiftFormerForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30910/en/model_doc/swiftformer#transformers.SwiftFormerConfig">SwiftFormerConfig</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_30910/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_30910/src/transformers/models/swiftformer/modeling_swiftformer.py#L511"}}),pe=new E({props:{name:"forward",anchor:"transformers.SwiftFormerForImageClassification.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SwiftFormerForImageClassification.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_30910/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_30910/en/model_doc/levit#transformers.LevitFeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.SwiftFormerForImageClassification.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.SwiftFormerForImageClassification.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_30910/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SwiftFormerForImageClassification.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_30910/src/transformers/models/swiftformer/modeling_swiftformer.py#L534",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30910/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_30910/en/model_doc/swiftformer#transformers.SwiftFormerConfig"
>SwiftFormerConfig</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_30910/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),A=new Re({props:{$$slots:{default:[no]},$$scope:{ctx:T}}}),Y=new It({props:{anchor:"transformers.SwiftFormerForImageClassification.forward.example",$$slots:{default:[ao]},$$scope:{ctx:T}}}),he=new $e({props:{title:"TFSwiftFormerModel",local:"transformers.TFSwiftFormerModel",headingTag:"h2"}}),ue=new E({props:{name:"class transformers.TFSwiftFormerModel",anchor:"transformers.TFSwiftFormerModel",parameters:[{name:"config",val:": SwiftFormerConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFSwiftFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30910/en/model_doc/swiftformer#transformers.SwiftFormerConfig">SwiftFormerConfig</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_30910/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_30910/src/transformers/models/swiftformer/modeling_tf_swiftformer.py#L703"}}),O=new Re({props:{$$slots:{default:[io]},$$scope:{ctx:T}}}),ge=new E({props:{name:"call",anchor:"transformers.TFSwiftFormerModel.call",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFSwiftFormerModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</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_30910/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_30910/en/model_doc/levit#transformers.LevitFeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.TFSwiftFormerModel.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.`,name:"output_hidden_states"},{anchor:"transformers.TFSwiftFormerModel.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_30910/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFSwiftFormerModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to run the model in training mode.`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/vr_30910/src/transformers/models/swiftformer/modeling_tf_swiftformer.py#L713"}}),D=new Re({props:{$$slots:{default:[lo]},$$scope:{ctx:T}}}),_e=new $e({props:{title:"TFSwiftFormerForImageClassification",local:"transformers.TFSwiftFormerForImageClassification",headingTag:"h2"}}),we=new E({props:{name:"class transformers.TFSwiftFormerForImageClassification",anchor:"transformers.TFSwiftFormerForImageClassification",parameters:[{name:"config",val:": SwiftFormerConfig"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFSwiftFormerForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30910/en/model_doc/swiftformer#transformers.SwiftFormerConfig">SwiftFormerConfig</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_30910/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_30910/src/transformers/models/swiftformer/modeling_tf_swiftformer.py#L739"}}),K=new Re({props:{$$slots:{default:[mo]},$$scope:{ctx:T}}}),be=new E({props:{name:"call",anchor:"transformers.TFSwiftFormerForImageClassification.call",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFSwiftFormerForImageClassification.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</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_30910/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_30910/en/model_doc/levit#transformers.LevitFeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.TFSwiftFormerForImageClassification.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.`,name:"output_hidden_states"},{anchor:"transformers.TFSwiftFormerForImageClassification.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_30910/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFSwiftFormerForImageClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to run the model in training mode.`,name:"training"},{anchor:"transformers.TFSwiftFormerForImageClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_30910/src/transformers/models/swiftformer/modeling_tf_swiftformer.py#L796"}}),ee=new Re({props:{$$slots:{default:[co]},$$scope:{ctx:T}}}),ve=new to({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/swiftformer.md"}}),{c(){t=c("meta"),p=i(),n=c("p"),a=i(),u($.$$.fragment),o=i(),u(F.$$.fragment),Ve=i(),te=c("p"),te.innerHTML=jt,He=i(),oe=c("p"),oe.textContent=Jt,Ne=i(),re=c("p"),re.textContent=Zt,ze=i(),se=c("p"),se.innerHTML=Wt,Le=i(),ne=c("p"),ne.innerHTML=kt,Ge=i(),u(ae.$$.fragment),Ee=i(),S=c("div"),u(ie.$$.fragment),ot=i(),Fe=c("p"),Fe.innerHTML=Rt,rt=i(),Te=c("p"),Te.innerHTML=Pt,st=i(),u(X.$$.fragment),Be=i(),u(le.$$.fragment),Xe=i(),J=c("div"),u(de.$$.fragment),nt=i(),ye=c("p"),ye.innerHTML=Vt,at=i(),U=c("div"),u(me.$$.fragment),it=i(),Me=c("p"),Me.innerHTML=Ht,lt=i(),u(q.$$.fragment),dt=i(),u(Q.$$.fragment),qe=i(),u(ce.$$.fragment),Qe=i(),x=c("div"),u(fe.$$.fragment),mt=i(),Ce=c("p"),Ce.textContent=Nt,ct=i(),Se=c("p"),Se.innerHTML=zt,ft=i(),j=c("div"),u(pe.$$.fragment),pt=i(),xe=c("p"),xe.innerHTML=Lt,ht=i(),u(A.$$.fragment),ut=i(),u(Y.$$.fragment),Ae=i(),u(he.$$.fragment),Ye=i(),M=c("div"),u(ue.$$.fragment),gt=i(),Ie=c("p"),Ie.innerHTML=Gt,_t=i(),Ue=c("p"),Ue.innerHTML=Et,wt=i(),u(O.$$.fragment),bt=i(),H=c("div"),u(ge.$$.fragment),vt=i(),je=c("p"),je.innerHTML=Bt,$t=i(),u(D.$$.fragment),Oe=i(),u(_e.$$.fragment),De=i(),y=c("div"),u(we.$$.fragment),Ft=i(),Je=c("p"),Je.textContent=Xt,Tt=i(),Ze=c("p"),Ze.innerHTML=qt,yt=i(),We=c("p"),We.innerHTML=Qt,Mt=i(),u(K.$$.fragment),Ct=i(),N=c("div"),u(be.$$.fragment),St=i(),ke=c("p"),ke.innerHTML=At,xt=i(),u(ee.$$.fragment),Ke=i(),u(ve.$$.fragment),et=i(),Pe=c("p"),this.h()},l(e){const r=eo("svelte-u9bgzb",document.head);t=f(r,"META",{name:!0,content:!0}),r.forEach(s),p=l(e),n=f(e,"P",{}),P(n).forEach(s),a=l(e),g($.$$.fragment,e),o=l(e),g(F.$$.fragment,e),Ve=l(e),te=f(e,"P",{"data-svelte-h":!0}),h(te)!=="svelte-1xrpfhe"&&(te.innerHTML=jt),He=l(e),oe=f(e,"P",{"data-svelte-h":!0}),h(oe)!=="svelte-q1qv2z"&&(oe.textContent=Jt),Ne=l(e),re=f(e,"P",{"data-svelte-h":!0}),h(re)!=="svelte-vfdo9a"&&(re.textContent=Zt),ze=l(e),se=f(e,"P",{"data-svelte-h":!0}),h(se)!=="svelte-1hgv92f"&&(se.innerHTML=Wt),Le=l(e),ne=f(e,"P",{"data-svelte-h":!0}),h(ne)!=="svelte-nbb7tj"&&(ne.innerHTML=kt),Ge=l(e),g(ae.$$.fragment,e),Ee=l(e),S=f(e,"DIV",{class:!0});var Z=P(S);g(ie.$$.fragment,Z),ot=l(Z),Fe=f(Z,"P",{"data-svelte-h":!0}),h(Fe)!=="svelte-106glzy"&&(Fe.innerHTML=Rt),rt=l(Z),Te=f(Z,"P",{"data-svelte-h":!0}),h(Te)!=="svelte-1df8qcr"&&(Te.innerHTML=Pt),st=l(Z),g(X.$$.fragment,Z),Z.forEach(s),Be=l(e),g(le.$$.fragment,e),Xe=l(e),J=f(e,"DIV",{class:!0});var z=P(J);g(de.$$.fragment,z),nt=l(z),ye=f(z,"P",{"data-svelte-h":!0}),h(ye)!=="svelte-12h2za7"&&(ye.innerHTML=Vt),at=l(z),U=f(z,"DIV",{class:!0});var W=P(U);g(me.$$.fragment,W),it=l(W),Me=f(W,"P",{"data-svelte-h":!0}),h(Me)!=="svelte-9v32hu"&&(Me.innerHTML=Ht),lt=l(W),g(q.$$.fragment,W),dt=l(W),g(Q.$$.fragment,W),W.forEach(s),z.forEach(s),qe=l(e),g(ce.$$.fragment,e),Qe=l(e),x=f(e,"DIV",{class:!0});var k=P(x);g(fe.$$.fragment,k),mt=l(k),Ce=f(k,"P",{"data-svelte-h":!0}),h(Ce)!=="svelte-cokk7a"&&(Ce.textContent=Nt),ct=l(k),Se=f(k,"P",{"data-svelte-h":!0}),h(Se)!=="svelte-1gjh92c"&&(Se.innerHTML=zt),ft=l(k),j=f(k,"DIV",{class:!0});var R=P(j);g(pe.$$.fragment,R),pt=l(R),xe=f(R,"P",{"data-svelte-h":!0}),h(xe)!=="svelte-1pf0vmc"&&(xe.innerHTML=Lt),ht=l(R),g(A.$$.fragment,R),ut=l(R),g(Y.$$.fragment,R),R.forEach(s),k.forEach(s),Ae=l(e),g(he.$$.fragment,e),Ye=l(e),M=f(e,"DIV",{class:!0});var I=P(M);g(ue.$$.fragment,I),gt=l(I),Ie=f(I,"P",{"data-svelte-h":!0}),h(Ie)!=="svelte-xezsuq"&&(Ie.innerHTML=Gt),_t=l(I),Ue=f(I,"P",{"data-svelte-h":!0}),h(Ue)!=="svelte-1be7e3c"&&(Ue.innerHTML=Et),wt=l(I),g(O.$$.fragment,I),bt=l(I),H=f(I,"DIV",{class:!0});var L=P(H);g(ge.$$.fragment,L),vt=l(L),je=f(L,"P",{"data-svelte-h":!0}),h(je)!=="svelte-16ufau"&&(je.innerHTML=Bt),$t=l(L),g(D.$$.fragment,L),L.forEach(s),I.forEach(s),Oe=l(e),g(_e.$$.fragment,e),De=l(e),y=f(e,"DIV",{class:!0});var C=P(y);g(we.$$.fragment,C),Ft=l(C),Je=f(C,"P",{"data-svelte-h":!0}),h(Je)!=="svelte-176ltck"&&(Je.textContent=Xt),Tt=l(C),Ze=f(C,"P",{"data-svelte-h":!0}),h(Ze)!=="svelte-1ny6off"&&(Ze.innerHTML=qt),yt=l(C),We=f(C,"P",{"data-svelte-h":!0}),h(We)!=="svelte-1be7e3c"&&(We.innerHTML=Qt),Mt=l(C),g(K.$$.fragment,C),Ct=l(C),N=f(C,"DIV",{class:!0});var G=P(N);g(be.$$.fragment,G),St=l(G),ke=f(G,"P",{"data-svelte-h":!0}),h(ke)!=="svelte-lkdp34"&&(ke.innerHTML=At),xt=l(G),g(ee.$$.fragment,G),G.forEach(s),C.forEach(s),Ke=l(e),g(ve.$$.fragment,e),et=l(e),Pe=f(e,"P",{}),P(Pe).forEach(s),this.h()},h(){V(t,"name","hf:doc:metadata"),V(t,"content",po),V(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(y,"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,r){m(document.head,t),d(e,p,r),d(e,n,r),d(e,a,r),_($,e,r),d(e,o,r),_(F,e,r),d(e,Ve,r),d(e,te,r),d(e,He,r),d(e,oe,r),d(e,Ne,r),d(e,re,r),d(e,ze,r),d(e,se,r),d(e,Le,r),d(e,ne,r),d(e,Ge,r),_(ae,e,r),d(e,Ee,r),d(e,S,r),_(ie,S,null),m(S,ot),m(S,Fe),m(S,rt),m(S,Te),m(S,st),_(X,S,null),d(e,Be,r),_(le,e,r),d(e,Xe,r),d(e,J,r),_(de,J,null),m(J,nt),m(J,ye),m(J,at),m(J,U),_(me,U,null),m(U,it),m(U,Me),m(U,lt),_(q,U,null),m(U,dt),_(Q,U,null),d(e,qe,r),_(ce,e,r),d(e,Qe,r),d(e,x,r),_(fe,x,null),m(x,mt),m(x,Ce),m(x,ct),m(x,Se),m(x,ft),m(x,j),_(pe,j,null),m(j,pt),m(j,xe),m(j,ht),_(A,j,null),m(j,ut),_(Y,j,null),d(e,Ae,r),_(he,e,r),d(e,Ye,r),d(e,M,r),_(ue,M,null),m(M,gt),m(M,Ie),m(M,_t),m(M,Ue),m(M,wt),_(O,M,null),m(M,bt),m(M,H),_(ge,H,null),m(H,vt),m(H,je),m(H,$t),_(D,H,null),d(e,Oe,r),_(_e,e,r),d(e,De,r),d(e,y,r),_(we,y,null),m(y,Ft),m(y,Je),m(y,Tt),m(y,Ze),m(y,yt),m(y,We),m(y,Mt),_(K,y,null),m(y,Ct),m(y,N),_(be,N,null),m(N,St),m(N,ke),m(N,xt),_(ee,N,null),d(e,Ke,r),_(ve,e,r),d(e,et,r),d(e,Pe,r),tt=!0},p(e,[r]){const Z={};r&2&&(Z.$$scope={dirty:r,ctx:e}),X.$set(Z);const z={};r&2&&(z.$$scope={dirty:r,ctx:e}),q.$set(z);const W={};r&2&&(W.$$scope={dirty:r,ctx:e}),Q.$set(W);const k={};r&2&&(k.$$scope={dirty:r,ctx:e}),A.$set(k);const R={};r&2&&(R.$$scope={dirty:r,ctx:e}),Y.$set(R);const I={};r&2&&(I.$$scope={dirty:r,ctx:e}),O.$set(I);const L={};r&2&&(L.$$scope={dirty:r,ctx:e}),D.$set(L);const C={};r&2&&(C.$$scope={dirty:r,ctx:e}),K.$set(C);const G={};r&2&&(G.$$scope={dirty:r,ctx:e}),ee.$set(G)},i(e){tt||(w($.$$.fragment,e),w(F.$$.fragment,e),w(ae.$$.fragment,e),w(ie.$$.fragment,e),w(X.$$.fragment,e),w(le.$$.fragment,e),w(de.$$.fragment,e),w(me.$$.fragment,e),w(q.$$.fragment,e),w(Q.$$.fragment,e),w(ce.$$.fragment,e),w(fe.$$.fragment,e),w(pe.$$.fragment,e),w(A.$$.fragment,e),w(Y.$$.fragment,e),w(he.$$.fragment,e),w(ue.$$.fragment,e),w(O.$$.fragment,e),w(ge.$$.fragment,e),w(D.$$.fragment,e),w(_e.$$.fragment,e),w(we.$$.fragment,e),w(K.$$.fragment,e),w(be.$$.fragment,e),w(ee.$$.fragment,e),w(ve.$$.fragment,e),tt=!0)},o(e){b($.$$.fragment,e),b(F.$$.fragment,e),b(ae.$$.fragment,e),b(ie.$$.fragment,e),b(X.$$.fragment,e),b(le.$$.fragment,e),b(de.$$.fragment,e),b(me.$$.fragment,e),b(q.$$.fragment,e),b(Q.$$.fragment,e),b(ce.$$.fragment,e),b(fe.$$.fragment,e),b(pe.$$.fragment,e),b(A.$$.fragment,e),b(Y.$$.fragment,e),b(he.$$.fragment,e),b(ue.$$.fragment,e),b(O.$$.fragment,e),b(ge.$$.fragment,e),b(D.$$.fragment,e),b(_e.$$.fragment,e),b(we.$$.fragment,e),b(K.$$.fragment,e),b(be.$$.fragment,e),b(ee.$$.fragment,e),b(ve.$$.fragment,e),tt=!1},d(e){e&&(s(p),s(n),s(a),s(o),s(Ve),s(te),s(He),s(oe),s(Ne),s(re),s(ze),s(se),s(Le),s(ne),s(Ge),s(Ee),s(S),s(Be),s(Xe),s(J),s(qe),s(Qe),s(x),s(Ae),s(Ye),s(M),s(Oe),s(De),s(y),s(Ke),s(et),s(Pe)),s(t),v($,e),v(F,e),v(ae,e),v(ie),v(X),v(le,e),v(de),v(me),v(q),v(Q),v(ce,e),v(fe),v(pe),v(A),v(Y),v(he,e),v(ue),v(O),v(ge),v(D),v(_e,e),v(we),v(K),v(be),v(ee),v(ve,e)}}}const po='{"title":"SwiftFormer","local":"swiftformer","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"SwiftFormerConfig","local":"transformers.SwiftFormerConfig","sections":[],"depth":2},{"title":"SwiftFormerModel","local":"transformers.SwiftFormerModel","sections":[],"depth":2},{"title":"SwiftFormerForImageClassification","local":"transformers.SwiftFormerForImageClassification","sections":[],"depth":2},{"title":"TFSwiftFormerModel","local":"transformers.TFSwiftFormerModel","sections":[],"depth":2},{"title":"TFSwiftFormerForImageClassification","local":"transformers.TFSwiftFormerForImageClassification","sections":[],"depth":2}],"depth":1}';function ho(T){return Ot(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fo extends Dt{constructor(t){super(),Kt(this,t,ho,fo,Yt,{})}}export{Fo as component};
