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 n,c as l,j as P,u as g,x as h,k as V,y as d,a as m,v as w,d as _,t as b,w as $}from"../chunks/index.d9030fc9.js";import{T as Re}from"../chunks/Tip.baa67368.js";import{D as L}from"../chunks/Docstring.ffac8efa.js";import{C as Ut}from"../chunks/CodeBlock.e6cd0d95.js";import{E as It}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as ve,E as to}from"../chunks/EditOnGithub.91d95064.js";function oo(T){let t,p="Example:",s,a,v;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,s=i(),u(a.$$.fragment)},l(o){t=f(o,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=p),s=l(o),g(a.$$.fragment,o)},m(o,F){m(o,t,F),m(o,s,F),w(a,o,F),v=!0},p:B,i(o){v||(_(a.$$.fragment,o),v=!0)},o(o){b(a.$$.fragment,o),v=!1},d(o){o&&(n(t),n(s)),$(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(s){t=f(s,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(s,a){m(s,t,a)},p:B,d(s){s&&n(t)}}}function no(T){let t,p="Example:",s,a,v;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,s=i(),u(a.$$.fragment)},l(o){t=f(o,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=p),s=l(o),g(a.$$.fragment,o)},m(o,F){m(o,t,F),m(o,s,F),w(a,o,F),v=!0},p:B,i(o){v||(_(a.$$.fragment,o),v=!0)},o(o){b(a.$$.fragment,o),v=!1},d(o){o&&(n(t),n(s)),$(a,o)}}}function so(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(s){t=f(s,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(s,a){m(s,t,a)},p:B,d(s){s&&n(t)}}}function ao(T){let t,p="Example:",s,a,v;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,s=i(),u(a.$$.fragment)},l(o){t=f(o,"P",{"data-svelte-h":!0}),h(t)!=="svelte-11lpom8"&&(t.textContent=p),s=l(o),g(a.$$.fragment,o)},m(o,F){m(o,t,F),m(o,s,F),w(a,o,F),v=!0},p:B,i(o){v||(_(a.$$.fragment,o),v=!0)},o(o){b(a.$$.fragment,o),v=!1},d(o){o&&(n(t),n(s)),$(a,o)}}}function io(T){let t,p="TF 2.0 models accepts two formats as inputs:",s,a,v=`<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,s=i(),a=c("ul"),a.innerHTML=v},l(o){t=f(o,"P",{"data-svelte-h":!0}),h(t)!=="svelte-ha0dwg"&&(t.textContent=p),s=l(o),a=f(o,"UL",{"data-svelte-h":!0}),h(a)!=="svelte-mgv7bm"&&(a.innerHTML=v)},m(o,F){m(o,t,F),m(o,s,F),m(o,a,F)},p:B,d(o){o&&(n(t),n(s),n(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(s){t=f(s,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(s,a){m(s,t,a)},p:B,d(s){s&&n(t)}}}function mo(T){let t,p="TF 2.0 models accepts two formats as inputs:",s,a,v=`<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,s=i(),a=c("ul"),a.innerHTML=v},l(o){t=f(o,"P",{"data-svelte-h":!0}),h(t)!=="svelte-ha0dwg"&&(t.textContent=p),s=l(o),a=f(o,"UL",{"data-svelte-h":!0}),h(a)!=="svelte-mgv7bm"&&(a.innerHTML=v)},m(o,F){m(o,t,F),m(o,s,F),m(o,a,F)},p:B,d(o){o&&(n(t),n(s),n(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(s){t=f(s,"P",{"data-svelte-h":!0}),h(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(s,a){m(s,t,a)},p:B,d(s){s&&n(t)}}}function fo(T){let t,p,s,a,v,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,ne,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>",Ge,se,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>.`,Ee,ae,Le,S,ie,ot,Fe,Rt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/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/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,nt,X,Be,le,Xe,J,me,st,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,de,it,Me,Ht='The <a href="/docs/transformers/main/en/model_doc/swiftformer#transformers.SwiftFormerModel">SwiftFormerModel</a> forward method, overrides the <code>__call__</code> special method.',lt,q,mt,A,qe,ce,Ae,x,fe,dt,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,Gt='The <a href="/docs/transformers/main/en/model_doc/swiftformer#transformers.SwiftFormerForImageClassification">SwiftFormerForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',ht,Q,ut,Y,Qe,he,Ye,M,ue,gt,Ie,Et=`The bare TFSwiftFormer Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,wt,Ue,Lt=`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.`,_t,O,bt,H,ge,$t,je,Bt='The <a href="/docs/transformers/main/en/model_doc/swiftformer#transformers.TFSwiftFormerModel">TFSwiftFormerModel</a> forward method, overrides the <code>__call__</code> special method.',vt,D,Oe,we,De,y,_e,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/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,yt,We,At=`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,Qt='The <a href="/docs/transformers/main/en/model_doc/swiftformer#transformers.TFSwiftFormerForImageClassification">TFSwiftFormerForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',xt,ee,Ke,$e,et,Pe,tt;return v=new ve({props:{title:"SwiftFormer",local:"swiftformer",headingTag:"h1"}}),F=new ve({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ae=new ve({props:{title:"SwiftFormerConfig",local:"transformers.SwiftFormerConfig",headingTag:"h2"}}),ie=new L({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/main/src/transformers/models/swiftformer/configuration_swiftformer.py#L30"}}),X=new It({props:{anchor:"transformers.SwiftFormerConfig.example",$$slots:{default:[oo]},$$scope:{ctx:T}}}),le=new ve({props:{title:"SwiftFormerModel",local:"transformers.SwiftFormerModel",headingTag:"h2"}}),me=new L({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/swiftformer/modeling_swiftformer.py#L456"}}),de=new L({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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/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/main/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}}}),A=new It({props:{anchor:"transformers.SwiftFormerModel.forward.example",$$slots:{default:[no]},$$scope:{ctx:T}}}),ce=new ve({props:{title:"SwiftFormerForImageClassification",local:"transformers.SwiftFormerForImageClassification",headingTag:"h2"}}),fe=new L({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/swiftformer/modeling_swiftformer.py#L511"}}),pe=new L({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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__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/main/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/main/src/transformers/models/swiftformer/modeling_swiftformer.py#L534",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Q=new Re({props:{$$slots:{default:[so]},$$scope:{ctx:T}}}),Y=new It({props:{anchor:"transformers.SwiftFormerForImageClassification.forward.example",$$slots:{default:[ao]},$$scope:{ctx:T}}}),he=new ve({props:{title:"TFSwiftFormerModel",local:"transformers.TFSwiftFormerModel",headingTag:"h2"}}),ue=new L({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/swiftformer/modeling_tf_swiftformer.py#L703"}}),O=new Re({props:{$$slots:{default:[io]},$$scope:{ctx:T}}}),ge=new L({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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__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/main/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/main/src/transformers/models/swiftformer/modeling_tf_swiftformer.py#L713"}}),D=new Re({props:{$$slots:{default:[lo]},$$scope:{ctx:T}}}),we=new ve({props:{title:"TFSwiftFormerForImageClassification",local:"transformers.TFSwiftFormerForImageClassification",headingTag:"h2"}}),_e=new L({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/swiftformer/modeling_tf_swiftformer.py#L739"}}),K=new Re({props:{$$slots:{default:[mo]},$$scope:{ctx:T}}}),be=new L({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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__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/main/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/main/src/transformers/models/swiftformer/modeling_tf_swiftformer.py#L796"}}),ee=new Re({props:{$$slots:{default:[co]},$$scope:{ctx:T}}}),$e=new to({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/swiftformer.md"}}),{c(){t=c("meta"),p=i(),s=c("p"),a=i(),u(v.$$.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(),ne=c("p"),ne.innerHTML=Wt,Ge=i(),se=c("p"),se.innerHTML=kt,Ee=i(),u(ae.$$.fragment),Le=i(),S=c("div"),u(ie.$$.fragment),ot=i(),Fe=c("p"),Fe.innerHTML=Rt,rt=i(),Te=c("p"),Te.innerHTML=Pt,nt=i(),u(X.$$.fragment),Be=i(),u(le.$$.fragment),Xe=i(),J=c("div"),u(me.$$.fragment),st=i(),ye=c("p"),ye.innerHTML=Vt,at=i(),U=c("div"),u(de.$$.fragment),it=i(),Me=c("p"),Me.innerHTML=Ht,lt=i(),u(q.$$.fragment),mt=i(),u(A.$$.fragment),qe=i(),u(ce.$$.fragment),Ae=i(),x=c("div"),u(fe.$$.fragment),dt=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=Gt,ht=i(),u(Q.$$.fragment),ut=i(),u(Y.$$.fragment),Qe=i(),u(he.$$.fragment),Ye=i(),M=c("div"),u(ue.$$.fragment),gt=i(),Ie=c("p"),Ie.innerHTML=Et,wt=i(),Ue=c("p"),Ue.innerHTML=Lt,_t=i(),u(O.$$.fragment),bt=i(),H=c("div"),u(ge.$$.fragment),$t=i(),je=c("p"),je.innerHTML=Bt,vt=i(),u(D.$$.fragment),Oe=i(),u(we.$$.fragment),De=i(),y=c("div"),u(_e.$$.fragment),Ft=i(),Je=c("p"),Je.textContent=Xt,Tt=i(),Ze=c("p"),Ze.innerHTML=qt,yt=i(),We=c("p"),We.innerHTML=At,Mt=i(),u(K.$$.fragment),Ct=i(),N=c("div"),u(be.$$.fragment),St=i(),ke=c("p"),ke.innerHTML=Qt,xt=i(),u(ee.$$.fragment),Ke=i(),u($e.$$.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(n),p=l(e),s=f(e,"P",{}),P(s).forEach(n),a=l(e),g(v.$$.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),ne=f(e,"P",{"data-svelte-h":!0}),h(ne)!=="svelte-1hgv92f"&&(ne.innerHTML=Wt),Ge=l(e),se=f(e,"P",{"data-svelte-h":!0}),h(se)!=="svelte-nbb7tj"&&(se.innerHTML=kt),Ee=l(e),g(ae.$$.fragment,e),Le=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-1rvnpyv"&&(Fe.innerHTML=Rt),rt=l(Z),Te=f(Z,"P",{"data-svelte-h":!0}),h(Te)!=="svelte-o55m63"&&(Te.innerHTML=Pt),nt=l(Z),g(X.$$.fragment,Z),Z.forEach(n),Be=l(e),g(le.$$.fragment,e),Xe=l(e),J=f(e,"DIV",{class:!0});var z=P(J);g(me.$$.fragment,z),st=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(de.$$.fragment,W),it=l(W),Me=f(W,"P",{"data-svelte-h":!0}),h(Me)!=="svelte-1lpypw3"&&(Me.innerHTML=Ht),lt=l(W),g(q.$$.fragment,W),mt=l(W),g(A.$$.fragment,W),W.forEach(n),z.forEach(n),qe=l(e),g(ce.$$.fragment,e),Ae=l(e),x=f(e,"DIV",{class:!0});var k=P(x);g(fe.$$.fragment,k),dt=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-ut67bx"&&(xe.innerHTML=Gt),ht=l(R),g(Q.$$.fragment,R),ut=l(R),g(Y.$$.fragment,R),R.forEach(n),k.forEach(n),Qe=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-1bo540t"&&(Ie.innerHTML=Et),wt=l(I),Ue=f(I,"P",{"data-svelte-h":!0}),h(Ue)!=="svelte-1be7e3c"&&(Ue.innerHTML=Lt),_t=l(I),g(O.$$.fragment,I),bt=l(I),H=f(I,"DIV",{class:!0});var G=P(H);g(ge.$$.fragment,G),$t=l(G),je=f(G,"P",{"data-svelte-h":!0}),h(je)!=="svelte-10km8kv"&&(je.innerHTML=Bt),vt=l(G),g(D.$$.fragment,G),G.forEach(n),I.forEach(n),Oe=l(e),g(we.$$.fragment,e),De=l(e),y=f(e,"DIV",{class:!0});var C=P(y);g(_e.$$.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-1qaxm70"&&(Ze.innerHTML=qt),yt=l(C),We=f(C,"P",{"data-svelte-h":!0}),h(We)!=="svelte-1be7e3c"&&(We.innerHTML=At),Mt=l(C),g(K.$$.fragment,C),Ct=l(C),N=f(C,"DIV",{class:!0});var E=P(N);g(be.$$.fragment,E),St=l(E),ke=f(E,"P",{"data-svelte-h":!0}),h(ke)!=="svelte-1pj99g1"&&(ke.innerHTML=Qt),xt=l(E),g(ee.$$.fragment,E),E.forEach(n),C.forEach(n),Ke=l(e),g($e.$$.fragment,e),et=l(e),Pe=f(e,"P",{}),P(Pe).forEach(n),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){d(document.head,t),m(e,p,r),m(e,s,r),m(e,a,r),w(v,e,r),m(e,o,r),w(F,e,r),m(e,Ve,r),m(e,te,r),m(e,He,r),m(e,oe,r),m(e,Ne,r),m(e,re,r),m(e,ze,r),m(e,ne,r),m(e,Ge,r),m(e,se,r),m(e,Ee,r),w(ae,e,r),m(e,Le,r),m(e,S,r),w(ie,S,null),d(S,ot),d(S,Fe),d(S,rt),d(S,Te),d(S,nt),w(X,S,null),m(e,Be,r),w(le,e,r),m(e,Xe,r),m(e,J,r),w(me,J,null),d(J,st),d(J,ye),d(J,at),d(J,U),w(de,U,null),d(U,it),d(U,Me),d(U,lt),w(q,U,null),d(U,mt),w(A,U,null),m(e,qe,r),w(ce,e,r),m(e,Ae,r),m(e,x,r),w(fe,x,null),d(x,dt),d(x,Ce),d(x,ct),d(x,Se),d(x,ft),d(x,j),w(pe,j,null),d(j,pt),d(j,xe),d(j,ht),w(Q,j,null),d(j,ut),w(Y,j,null),m(e,Qe,r),w(he,e,r),m(e,Ye,r),m(e,M,r),w(ue,M,null),d(M,gt),d(M,Ie),d(M,wt),d(M,Ue),d(M,_t),w(O,M,null),d(M,bt),d(M,H),w(ge,H,null),d(H,$t),d(H,je),d(H,vt),w(D,H,null),m(e,Oe,r),w(we,e,r),m(e,De,r),m(e,y,r),w(_e,y,null),d(y,Ft),d(y,Je),d(y,Tt),d(y,Ze),d(y,yt),d(y,We),d(y,Mt),w(K,y,null),d(y,Ct),d(y,N),w(be,N,null),d(N,St),d(N,ke),d(N,xt),w(ee,N,null),m(e,Ke,r),w($e,e,r),m(e,et,r),m(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}),A.$set(W);const k={};r&2&&(k.$$scope={dirty:r,ctx:e}),Q.$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 G={};r&2&&(G.$$scope={dirty:r,ctx:e}),D.$set(G);const C={};r&2&&(C.$$scope={dirty:r,ctx:e}),K.$set(C);const E={};r&2&&(E.$$scope={dirty:r,ctx:e}),ee.$set(E)},i(e){tt||(_(v.$$.fragment,e),_(F.$$.fragment,e),_(ae.$$.fragment,e),_(ie.$$.fragment,e),_(X.$$.fragment,e),_(le.$$.fragment,e),_(me.$$.fragment,e),_(de.$$.fragment,e),_(q.$$.fragment,e),_(A.$$.fragment,e),_(ce.$$.fragment,e),_(fe.$$.fragment,e),_(pe.$$.fragment,e),_(Q.$$.fragment,e),_(Y.$$.fragment,e),_(he.$$.fragment,e),_(ue.$$.fragment,e),_(O.$$.fragment,e),_(ge.$$.fragment,e),_(D.$$.fragment,e),_(we.$$.fragment,e),_(_e.$$.fragment,e),_(K.$$.fragment,e),_(be.$$.fragment,e),_(ee.$$.fragment,e),_($e.$$.fragment,e),tt=!0)},o(e){b(v.$$.fragment,e),b(F.$$.fragment,e),b(ae.$$.fragment,e),b(ie.$$.fragment,e),b(X.$$.fragment,e),b(le.$$.fragment,e),b(me.$$.fragment,e),b(de.$$.fragment,e),b(q.$$.fragment,e),b(A.$$.fragment,e),b(ce.$$.fragment,e),b(fe.$$.fragment,e),b(pe.$$.fragment,e),b(Q.$$.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(we.$$.fragment,e),b(_e.$$.fragment,e),b(K.$$.fragment,e),b(be.$$.fragment,e),b(ee.$$.fragment,e),b($e.$$.fragment,e),tt=!1},d(e){e&&(n(p),n(s),n(a),n(o),n(Ve),n(te),n(He),n(oe),n(Ne),n(re),n(ze),n(ne),n(Ge),n(se),n(Ee),n(Le),n(S),n(Be),n(Xe),n(J),n(qe),n(Ae),n(x),n(Qe),n(Ye),n(M),n(Oe),n(De),n(y),n(Ke),n(et),n(Pe)),n(t),$(v,e),$(F,e),$(ae,e),$(ie),$(X),$(le,e),$(me),$(de),$(q),$(A),$(ce,e),$(fe),$(pe),$(Q),$(Y),$(he,e),$(ue),$(O),$(ge),$(D),$(we,e),$(_e),$(K),$(be),$(ee),$($e,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};
