import{s as _s,o as bs,n as nt}from"../chunks/scheduler.9bc65507.js";import{S as vs,i as ys,g as n,s as a,u,A as Ms,h as s,f as t,c as i,j as g,v as _,y as p,k as m,o,a as l,w as b,d as v,t as y,x as M}from"../chunks/index.78c82d43.js";import{T as bn}from"../chunks/Tip.87d55b76.js";import{D as z}from"../chunks/Docstring.4e7352e2.js";import{C as jo}from"../chunks/CodeBlock.73e038be.js";import{I as H}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Fo}from"../chunks/ExampleCodeBlock.872b014d.js";import{P as ws}from"../chunks/PipelineTag.75b0f707.js";function Ts(x){let d,T="Example:",h,f,w;return f=new jo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1vYmlsZU5ldFYyQ29uZmlnJTJDJTIwTW9iaWxlTmV0VjJNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjAlMjJtb2JpbGVuZXRfdjJfMS4wXzIyNCUyMiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBNb2JpbGVOZXRWMkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMCUyMm1vYmlsZW5ldF92Ml8xLjBfMjI0JTIyJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBNb2JpbGVOZXRWMk1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MobileNetV2Config, MobileNetV2Model

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a &quot;mobilenet_v2_1.0_224&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = MobileNetV2Config()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the &quot;mobilenet_v2_1.0_224&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileNetV2Model(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(){d=n("p"),d.textContent=T,h=a(),u(f.$$.fragment)},l(c){d=s(c,"P",{"data-svelte-h":!0}),p(d)!=="svelte-11lpom8"&&(d.textContent=T),h=i(c),_(f.$$.fragment,c)},m(c,N){l(c,d,N),l(c,h,N),b(f,c,N),w=!0},p:nt,i(c){w||(v(f.$$.fragment,c),w=!0)},o(c){y(f.$$.fragment,c),w=!1},d(c){c&&(t(d),t(h)),M(f,c)}}}function Ns(x){let d,T=`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(){d=n("p"),d.innerHTML=T},l(h){d=s(h,"P",{"data-svelte-h":!0}),p(d)!=="svelte-fincs2"&&(d.innerHTML=T)},m(h,f){l(h,d,f)},p:nt,d(h){h&&t(d)}}}function xs(x){let d,T="Example:",h,f,w;return f=new jo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyME1vYmlsZU5ldFYyTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRm1vYmlsZW5ldF92Ml8xLjBfMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwTW9iaWxlTmV0VjJNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGbW9iaWxlbmV0X3YyXzEuMF8yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, MobileNetV2Model
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;google/mobilenet_v2_1.0_224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileNetV2Model.from_pretrained(<span class="hljs-string">&quot;google/mobilenet_v2_1.0_224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">1280</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`,wrap:!1}}),{c(){d=n("p"),d.textContent=T,h=a(),u(f.$$.fragment)},l(c){d=s(c,"P",{"data-svelte-h":!0}),p(d)!=="svelte-11lpom8"&&(d.textContent=T),h=i(c),_(f.$$.fragment,c)},m(c,N){l(c,d,N),l(c,h,N),b(f,c,N),w=!0},p:nt,i(c){w||(v(f.$$.fragment,c),w=!0)},o(c){y(f.$$.fragment,c),w=!1},d(c){c&&(t(d),t(h)),M(f,c)}}}function $s(x){let d,T=`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(){d=n("p"),d.innerHTML=T},l(h){d=s(h,"P",{"data-svelte-h":!0}),p(d)!=="svelte-fincs2"&&(d.innerHTML=T)},m(h,f){l(h,d,f)},p:nt,d(h){h&&t(d)}}}function Cs(x){let d,T="Example:",h,f,w;return f=new jo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyME1vYmlsZU5ldFYyRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGbW9iaWxlbmV0X3YyXzEuMF8yMjQlMjIpJTBBbW9kZWwlMjAlM0QlMjBNb2JpbGVOZXRWMkZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRm1vYmlsZW5ldF92Ml8xLjBfMjI0JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, MobileNetV2ForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;google/mobilenet_v2_1.0_224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileNetV2ForImageClassification.from_pretrained(<span class="hljs-string">&quot;google/mobilenet_v2_1.0_224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`,wrap:!1}}),{c(){d=n("p"),d.textContent=T,h=a(),u(f.$$.fragment)},l(c){d=s(c,"P",{"data-svelte-h":!0}),p(d)!=="svelte-11lpom8"&&(d.textContent=T),h=i(c),_(f.$$.fragment,c)},m(c,N){l(c,d,N),l(c,h,N),b(f,c,N),w=!0},p:nt,i(c){w||(v(f.$$.fragment,c),w=!0)},o(c){y(f.$$.fragment,c),w=!1},d(c){c&&(t(d),t(h)),M(f,c)}}}function Vs(x){let d,T=`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(){d=n("p"),d.innerHTML=T},l(h){d=s(h,"P",{"data-svelte-h":!0}),p(d)!=="svelte-fincs2"&&(d.innerHTML=T)},m(h,f){l(h,d,f)},p:nt,d(h){h&&t(d)}}}function Is(x){let d,T="Examples:",h,f,w;return f=new jo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyME1vYmlsZU5ldFYyRm9yU2VtYW50aWNTZWdtZW50YXRpb24lMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmRlZXBsYWJ2M19tb2JpbGVuZXRfdjJfMS4wXzUxMyUyMiklMEFtb2RlbCUyMCUzRCUyME1vYmlsZU5ldFYyRm9yU2VtYW50aWNTZWdtZW50YXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmRlZXBsYWJ2M19tb2JpbGVuZXRfdjJfMS4wXzUxMyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBJTIzJTIwbG9naXRzJTIwYXJlJTIwb2YlMjBzaGFwZSUyMChiYXRjaF9zaXplJTJDJTIwbnVtX2xhYmVscyUyQyUyMGhlaWdodCUyQyUyMHdpZHRoKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, MobileNetV2ForSemanticSegmentation
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

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

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;google/deeplabv3_mobilenet_v2_1.0_513&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileNetV2ForSemanticSegmentation.from_pretrained(<span class="hljs-string">&quot;google/deeplabv3_mobilenet_v2_1.0_513&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=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><span class="hljs-comment"># logits are of shape (batch_size, num_labels, height, width)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`,wrap:!1}}),{c(){d=n("p"),d.textContent=T,h=a(),u(f.$$.fragment)},l(c){d=s(c,"P",{"data-svelte-h":!0}),p(d)!=="svelte-kvfsh7"&&(d.textContent=T),h=i(c),_(f.$$.fragment,c)},m(c,N){l(c,d,N),l(c,h,N),b(f,c,N),w=!0},p:nt,i(c){w||(v(f.$$.fragment,c),w=!0)},o(c){y(f.$$.fragment,c),w=!1},d(c){c&&(t(d),t(h)),M(f,c)}}}function zs(x){let d,T,h,f,w,c,N,_e,Uo,st,vn="MobileNet V2",At,k,B,zt,be,So,rt,yn="Overview",Ht,ve,Mn='The MobileNet model was proposed in <a href="https://arxiv.org/abs/1801.04381" rel="nofollow">MobileNetV2: Inverted Residuals and Linear Bottlenecks</a> by Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, Liang-Chieh Chen.',Bt,ye,wn="The abstract from the paper is the following:",Dt,Me,Tn="<em>In this paper we describe a new mobile architecture, MobileNetV2, that improves the state of the art performance of mobile models on multiple tasks and benchmarks as well as across a spectrum of different model sizes. We also describe efficient ways of applying these mobile models to object detection in a novel framework we call SSDLite. Additionally, we demonstrate how to build mobile semantic segmentation models through a reduced form of DeepLabv3 which we call Mobile DeepLabv3.</em>",Gt,we,Nn="<em>The MobileNetV2 architecture is based on an inverted residual structure where the input and output of the residual block are thin bottleneck layers opposite to traditional residual models which use expanded representations in the input an MobileNetV2 uses lightweight depthwise convolutions to filter features in the intermediate expansion layer. Additionally, we find that it is important to remove non-linearities in the narrow layers in order to maintain representational power. We demonstrate that this improves performance and provide an intuition that led to this design. Finally, our approach allows decoupling of the input/output domains from the expressiveness of the transformation, which provides a convenient framework for further analysis. We measure our performance on Imagenet classification, COCO object detection, VOC image segmentation. We evaluate the trade-offs between accuracy, and number of operations measured by multiply-adds (MAdd), as well as the number of parameters.</em>",Xt,Te,xn="Tips:",qt,Ne,$n='<li><p>The checkpoints are named <strong>mobilenet_v2_<em>depth</em>_<em>size</em></strong>, for example <strong>mobilenet_v2_1.0_224</strong>, where <strong>1.0</strong> is the depth multiplier (sometimes also referred to as “alpha” or the width multiplier) and <strong>224</strong> is the resolution of the input images the model was trained on.</p></li> <li><p>Even though the checkpoint is trained on images of specific size, the model will work on images of any size. The smallest supported image size is 32x32.</p></li> <li><p>One can use <a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2ImageProcessor">MobileNetV2ImageProcessor</a> to prepare images for the model.</p></li> <li><p>The available image classification checkpoints are pre-trained on <a href="https://huggingface.co/datasets/imagenet-1k" rel="nofollow">ImageNet-1k</a> (also referred to as ILSVRC 2012, a collection of 1.3 million images and 1,000 classes). However, the model predicts 1001 classes: the 1000 classes from ImageNet plus an extra “background” class (index 0).</p></li> <li><p>The segmentation model uses a <a href="https://arxiv.org/abs/1802.02611" rel="nofollow">DeepLabV3+</a> head. The available semantic segmentation checkpoints are pre-trained on <a href="http://host.robots.ox.ac.uk/pascal/VOC/" rel="nofollow">PASCAL VOC</a>.</p></li> <li><p>The original TensorFlow checkpoints use different padding rules than PyTorch, requiring the model to determine the padding amount at inference time, since this depends on the input image size. To use native PyTorch padding behavior, create a <a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2Config">MobileNetV2Config</a> with <code>tf_padding = False</code>.</p></li>',Yt,xe,Cn="Unsupported features:",Ot,$e,Vn='<li><p>The <a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2Model">MobileNetV2Model</a> outputs a globally pooled version of the last hidden state. In the original model it is possible to use an average pooling layer with a fixed 7x7 window and stride 1 instead of global pooling. For inputs that are larger than the recommended image size, this gives a pooled output that is larger than 1x1. The Hugging Face implementation does not support this.</p></li> <li><p>The original TensorFlow checkpoints include quantized models. We do not support these models as they include additional “FakeQuantization” operations to unquantize the weights.</p></li> <li><p>It’s common to extract the output from the expansion layers at indices 10 and 13, as well as the output from the final 1x1 convolution layer, for downstream purposes. Using <code>output_hidden_states=True</code> returns the output from all intermediate layers. There is currently no way to limit this to specific layers.</p></li> <li><p>The DeepLabV3+ segmentation head does not use the final convolution layer from the backbone, but this layer gets computed anyway. There is currently no way to tell <a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2Model">MobileNetV2Model</a> up to which layer it should run.</p></li>',Qt,Ce,In='This model was contributed by <a href="https://huggingface.co/Matthijs" rel="nofollow">matthijs</a>. The original code and weights can be found <a href="https://github.com/tensorflow/models/tree/master/research/slim/nets/mobilenet" rel="nofollow">here for the main model</a> and <a href="https://github.com/tensorflow/models/tree/master/research/deeplab" rel="nofollow">here for DeepLabV3+</a>.',Kt,R,D,Ft,Ve,Po,at,zn="Resources",eo,Ie,Fn="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with MobileNetV2.",to,ze,oo,Fe,jn='<li><a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2ForImageClassification">MobileNetV2ForImageClassification</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification" rel="nofollow">example script</a> and <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb" rel="nofollow">notebook</a>.</li> <li>See also: <a href="../tasks/image_classification">Image classification task guide</a></li>',no,je,Un="<strong>Semantic segmentation</strong>",so,Ue,Sn='<li><a href="../tasks/semantic_segmentation">Semantic segmentation task guide</a></li>',ro,Se,Pn="If you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.",ao,W,G,jt,Pe,ko,it,kn="MobileNetV2Config",io,$,ke,Ro,lt,Rn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2Model">MobileNetV2Model</a>. It is used to instantiate a
MobileNetV2 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 MobileNetV2
<a href="https://huggingface.co/google/mobilenet_v2_1.0_224" rel="nofollow">google/mobilenet_v2_1.0_224</a> architecture.`,Wo,ct,Wn=`Configuration objects inherit from <a href="/docs/transformers/v4.34.0/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/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Eo,X,lo,E,q,Ut,Re,Jo,dt,En="MobileNetV2FeatureExtractor",co,S,We,Zo,Y,Ee,Lo,mt,Jn="Preprocess an image or batch of images.",Ao,O,Je,Ho,pt,Zn=`Converts the output of <a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2ForSemanticSegmentation">MobileNetV2ForSemanticSegmentation</a> into semantic segmentation maps. Only supports
PyTorch.`,mo,J,Q,St,Ze,Bo,ht,Ln="MobileNetV2ImageProcessor",po,C,Le,Do,ft,An="Constructs a MobileNetV2 image processor.",Go,K,Ae,Xo,gt,Hn="Preprocess an image or batch of images.",qo,ee,He,Yo,ut,Bn=`Converts the output of <a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2ForSemanticSegmentation">MobileNetV2ForSemanticSegmentation</a> into semantic segmentation maps. Only supports
PyTorch.`,ho,Z,te,Pt,Be,Oo,_t,Dn="MobileNetV2Model",fo,P,De,Qo,bt,Gn=`The bare MobileNetV2 model 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.`,Ko,F,Ge,en,vt,Xn='The <a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2Model">MobileNetV2Model</a> forward method, overrides the <code>__call__</code> special method.',tn,oe,on,ne,go,L,se,kt,Xe,nn,yt,qn="MobileNetV2ForImageClassification",uo,V,qe,sn,Mt,Yn=`MobileNetV2 model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,rn,wt,On=`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.`,an,j,Ye,ln,Tt,Qn='The <a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2ForImageClassification">MobileNetV2ForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',cn,re,dn,ae,_o,A,ie,Rt,Oe,mn,Nt,Kn="MobileNetV2ForSemanticSegmentation",bo,I,Qe,pn,xt,es="MobileNetV2 model with a semantic segmentation head on top, e.g. for Pascal VOC.",hn,$t,ts=`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.`,fn,U,Ke,gn,Ct,os='The <a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2ForSemanticSegmentation">MobileNetV2ForSemanticSegmentation</a> forward method, overrides the <code>__call__</code> special method.',un,le,_n,ce,vo,Wt,yo;return _e=new H({}),be=new H({}),Ve=new H({}),ze=new ws({props:{pipeline:"image-classification"}}),Pe=new H({}),ke=new z({props:{name:"class transformers.MobileNetV2Config",anchor:"transformers.MobileNetV2Config",parameters:[{name:"num_channels",val:" = 3"},{name:"image_size",val:" = 224"},{name:"depth_multiplier",val:" = 1.0"},{name:"depth_divisible_by",val:" = 8"},{name:"min_depth",val:" = 8"},{name:"expand_ratio",val:" = 6"},{name:"output_stride",val:" = 32"},{name:"first_layer_is_expansion",val:" = True"},{name:"finegrained_output",val:" = True"},{name:"hidden_act",val:" = 'relu6'"},{name:"tf_padding",val:" = True"},{name:"classifier_dropout_prob",val:" = 0.8"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 0.001"},{name:"semantic_loss_ignore_index",val:" = 255"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileNetV2Config.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.MobileNetV2Config.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.MobileNetV2Config.depth_multiplier",description:`<strong>depth_multiplier</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Shrinks or expands the number of channels in each layer. Default is 1.0, which starts the network with 32
channels. This is sometimes also called &#x201C;alpha&#x201D; or &#x201C;width multiplier&#x201D;.`,name:"depth_multiplier"},{anchor:"transformers.MobileNetV2Config.depth_divisible_by",description:`<strong>depth_divisible_by</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
The number of channels in each layer will always be a multiple of this number.`,name:"depth_divisible_by"},{anchor:"transformers.MobileNetV2Config.min_depth",description:`<strong>min_depth</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
All layers will have at least this many channels.`,name:"min_depth"},{anchor:"transformers.MobileNetV2Config.expand_ratio",description:`<strong>expand_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 6.0) &#x2014;
The number of output channels of the first layer in each block is input channels times expansion ratio.`,name:"expand_ratio"},{anchor:"transformers.MobileNetV2Config.output_stride",description:`<strong>output_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The ratio between the spatial resolution of the input and output feature maps. By default the model reduces
the input dimensions by a factor of 32. If <code>output_stride</code> is 8 or 16, the model uses dilated convolutions
on the depthwise layers instead of regular convolutions, so that the feature maps never become more than 8x
or 16x smaller than the input image.`,name:"output_stride"},{anchor:"transformers.MobileNetV2Config.first_layer_is_expansion",description:`<strong>first_layer_is_expansion</strong> (<code>bool</code>, <code>optional</code>, defaults to <code>True</code>) &#x2014;
True if the very first convolution layer is also the expansion layer for the first expansion block.`,name:"first_layer_is_expansion"},{anchor:"transformers.MobileNetV2Config.finegrained_output",description:`<strong>finegrained_output</strong> (<code>bool</code>, <code>optional</code>, defaults to <code>True</code>) &#x2014;
If true, the number of output channels in the final convolution layer will stay large (1280) even if
<code>depth_multiplier</code> is less than 1.`,name:"finegrained_output"},{anchor:"transformers.MobileNetV2Config.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;relu6&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the Transformer encoder and convolution layers.`,name:"hidden_act"},{anchor:"transformers.MobileNetV2Config.tf_padding",description:`<strong>tf_padding</strong> (<code>bool</code>, <code>optional</code>, defaults to <code>True</code>) &#x2014;
Whether to use TensorFlow padding rules on the convolution layers.`,name:"tf_padding"},{anchor:"transformers.MobileNetV2Config.classifier_dropout_prob",description:`<strong>classifier_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.999) &#x2014;
The dropout ratio for attached classifiers.`,name:"classifier_dropout_prob"},{anchor:"transformers.MobileNetV2Config.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.MobileNetV2Config.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 0.001) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.MobileNetV2Config.semantic_loss_ignore_index",description:`<strong>semantic_loss_ignore_index</strong> (<code>int</code>, <em>optional</em>, defaults to 255) &#x2014;
The index that is ignored by the loss function of the semantic segmentation model.`,name:"semantic_loss_ignore_index"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/mobilenet_v2/configuration_mobilenet_v2.py#L38"}}),X=new Fo({props:{anchor:"transformers.MobileNetV2Config.example",$$slots:{default:[Ts]},$$scope:{ctx:x}}}),Re=new H({}),We=new z({props:{name:"class transformers.MobileNetV2FeatureExtractor",anchor:"transformers.MobileNetV2FeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/mobilenet_v2/feature_extraction_mobilenet_v2.py#L26"}}),Ee=new z({props:{name:"preprocess",anchor:"transformers.MobileNetV2FeatureExtractor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": bool = None"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after resizing. Shortest edge of the image is resized to size[&#x201C;shortest_edge&#x201D;], with
the longest edge resized to keep the input aspect ratio.`,name:"size"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code> filter, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
<code>PILImageResampling</code> filter to use if resizing the image e.g. <code>PILImageResampling.BILINEAR</code>. Only has
an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image.`,name:"do_center_crop"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the center crop. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.`,name:"crop_size"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to use if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to use if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_std"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.MobileNetV2FeatureExtractor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/mobilenet_v2/image_processing_mobilenet_v2.py#L161"}}),Je=new z({props:{name:"post_process_semantic_segmentation",anchor:"transformers.MobileNetV2FeatureExtractor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": typing.List[typing.Tuple] = None"}],parametersDescription:[{anchor:"transformers.MobileNetV2FeatureExtractor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2ForSemanticSegmentation">MobileNetV2ForSemanticSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.MobileNetV2FeatureExtractor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code> of length <code>batch_size</code>, <em>optional</em>) &#x2014;
List of tuples corresponding to the requested final size (height, width) of each prediction. If unset,
predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/mobilenet_v2/image_processing_mobilenet_v2.py#L304",returnDescription:`
<p><code>List[torch.Tensor]</code> of length <code>batch_size</code>, where each item is a semantic
segmentation map of shape (height, width) corresponding to the target_sizes entry (if <code>target_sizes</code> is
specified). Each entry of each <code>torch.Tensor</code> correspond to a semantic class id.</p>
`,returnType:`
<p>semantic_segmentation</p>
`}}),Ze=new H({}),Le=new z({props:{name:"class transformers.MobileNetV2ImageProcessor",anchor:"transformers.MobileNetV2ImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileNetV2ImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by
<code>do_resize</code> in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.MobileNetV2ImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 256}</code>):
Size of the image after resizing. The shortest edge of the image is resized to size[&#x201C;shortest_edge&#x201D;], with
the longest edge resized to keep the input aspect ratio. Can be overridden by <code>size</code> in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.MobileNetV2ImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by the <code>resample</code> parameter in the
<code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.MobileNetV2ImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to center crop the image. If the input size is smaller than <code>crop_size</code> along any edge, the image
is padded with 0&#x2019;s and then center cropped. Can be overridden by the <code>do_center_crop</code> parameter in the
<code>preprocess</code> method.`,name:"do_center_crop"},{anchor:"transformers.MobileNetV2ImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Desired output size when applying center-cropping. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.
Can be overridden by the <code>crop_size</code> parameter in the <code>preprocess</code> method.`,name:"crop_size"},{anchor:"transformers.MobileNetV2ImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the <code>do_rescale</code>
parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.MobileNetV2ImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by the <code>rescale_factor</code> parameter in the
<code>preprocess</code> method.
do_normalize &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"rescale_factor"},{anchor:"transformers.MobileNetV2ImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.MobileNetV2ImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/mobilenet_v2/image_processing_mobilenet_v2.py#L49"}}),Ae=new z({props:{name:"preprocess",anchor:"transformers.MobileNetV2ImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": bool = None"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after resizing. Shortest edge of the image is resized to size[&#x201C;shortest_edge&#x201D;], with
the longest edge resized to keep the input aspect ratio.`,name:"size"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code> filter, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
<code>PILImageResampling</code> filter to use if resizing the image e.g. <code>PILImageResampling.BILINEAR</code>. Only has
an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image.`,name:"do_center_crop"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the center crop. Only has an effect if <code>do_center_crop</code> is set to <code>True</code>.`,name:"crop_size"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to use if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to use if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_std"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.MobileNetV2ImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/mobilenet_v2/image_processing_mobilenet_v2.py#L161"}}),He=new z({props:{name:"post_process_semantic_segmentation",anchor:"transformers.MobileNetV2ImageProcessor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": typing.List[typing.Tuple] = None"}],parametersDescription:[{anchor:"transformers.MobileNetV2ImageProcessor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2ForSemanticSegmentation">MobileNetV2ForSemanticSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.MobileNetV2ImageProcessor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code> of length <code>batch_size</code>, <em>optional</em>) &#x2014;
List of tuples corresponding to the requested final size (height, width) of each prediction. If unset,
predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/mobilenet_v2/image_processing_mobilenet_v2.py#L304",returnDescription:`
<p><code>List[torch.Tensor]</code> of length <code>batch_size</code>, where each item is a semantic
segmentation map of shape (height, width) corresponding to the target_sizes entry (if <code>target_sizes</code> is
specified). Each entry of each <code>torch.Tensor</code> correspond to a semantic class id.</p>
`,returnType:`
<p>semantic_segmentation</p>
`}}),Be=new H({}),De=new z({props:{name:"class transformers.MobileNetV2Model",anchor:"transformers.MobileNetV2Model",parameters:[{name:"config",val:": MobileNetV2Config"},{name:"add_pooling_layer",val:": bool = True"}],parametersDescription:[{anchor:"transformers.MobileNetV2Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2Config">MobileNetV2Config</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/v4.34.0/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/v4.34.0/src/transformers/models/mobilenet_v2/modeling_mobilenet_v2.py#L502"}}),Ge=new z({props:{name:"forward",anchor:"transformers.MobileNetV2Model.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MobileNetV2Model.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/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">MobileNetV2ImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.MobileNetV2Model.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.MobileNetV2Model.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/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/mobilenet_v2/modeling_mobilenet_v2.py#L566",returnDescription:`
<p>A <code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2Config"
>MobileNetV2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state after a pooling operation on the spatial dimensions.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, num_channels, height, width)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),oe=new bn({props:{$$slots:{default:[Ns]},$$scope:{ctx:x}}}),ne=new Fo({props:{anchor:"transformers.MobileNetV2Model.forward.example",$$slots:{default:[xs]},$$scope:{ctx:x}}}),Xe=new H({}),qe=new z({props:{name:"class transformers.MobileNetV2ForImageClassification",anchor:"transformers.MobileNetV2ForImageClassification",parameters:[{name:"config",val:": MobileNetV2Config"}],parametersDescription:[{anchor:"transformers.MobileNetV2ForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2Config">MobileNetV2Config</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/v4.34.0/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/v4.34.0/src/transformers/models/mobilenet_v2/modeling_mobilenet_v2.py#L622"}}),Ye=new z({props:{name:"forward",anchor:"transformers.MobileNetV2ForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MobileNetV2ForImageClassification.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/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">MobileNetV2ImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.MobileNetV2ForImageClassification.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.MobileNetV2ForImageClassification.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/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MobileNetV2ForImageClassification.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/v4.34.0/src/transformers/models/mobilenet_v2/modeling_mobilenet_v2.py#L638",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/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/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2Config"
>MobileNetV2Config</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:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),re=new bn({props:{$$slots:{default:[$s]},$$scope:{ctx:x}}}),ae=new Fo({props:{anchor:"transformers.MobileNetV2ForImageClassification.forward.example",$$slots:{default:[Cs]},$$scope:{ctx:x}}}),Oe=new H({}),Qe=new z({props:{name:"class transformers.MobileNetV2ForSemanticSegmentation",anchor:"transformers.MobileNetV2ForSemanticSegmentation",parameters:[{name:"config",val:": MobileNetV2Config"}],parametersDescription:[{anchor:"transformers.MobileNetV2ForSemanticSegmentation.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2Config">MobileNetV2Config</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/v4.34.0/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/v4.34.0/src/transformers/models/mobilenet_v2/modeling_mobilenet_v2.py#L781"}}),Ke=new z({props:{name:"forward",anchor:"transformers.MobileNetV2ForSemanticSegmentation.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MobileNetV2ForSemanticSegmentation.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/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">MobileNetV2ImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.MobileNetV2ForSemanticSegmentation.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.MobileNetV2ForSemanticSegmentation.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/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MobileNetV2ForSemanticSegmentation.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Ground truth semantic segmentation maps for computing the loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels &gt; 1</code>, a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/mobilenet_v2/modeling_mobilenet_v2.py#L792",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</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/v4.34.0/en/model_doc/mobilenet_v2#transformers.MobileNetV2Config"
>MobileNetV2Config</a>) and inputs.</p>
<ul>
<li>
<p><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.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels, logits_height, logits_width)</code>) — Classification scores for each pixel.</p>
<Tip warning={true}>
<p>The logits returned do not necessarily have the same size as the <code>pixel_values</code> passed as inputs. This is
to avoid doing two interpolations and lose some quality when a user needs to resize the logits to the
original image size as post-processing. You should always check your logits shape and resize as needed.</p>
</Tip>
</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, patch_size, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),le=new bn({props:{$$slots:{default:[Vs]},$$scope:{ctx:x}}}),ce=new Fo({props:{anchor:"transformers.MobileNetV2ForSemanticSegmentation.forward.example",$$slots:{default:[Is]},$$scope:{ctx:x}}}),{c(){d=n("meta"),T=a(),h=n("p"),f=a(),w=n("h1"),c=n("a"),N=n("span"),u(_e.$$.fragment),Uo=a(),st=n("span"),st.textContent=vn,At=a(),k=n("h2"),B=n("a"),zt=n("span"),u(be.$$.fragment),So=a(),rt=n("span"),rt.textContent=yn,Ht=a(),ve=n("p"),ve.innerHTML=Mn,Bt=a(),ye=n("p"),ye.textContent=wn,Dt=a(),Me=n("p"),Me.innerHTML=Tn,Gt=a(),we=n("p"),we.innerHTML=Nn,Xt=a(),Te=n("p"),Te.textContent=xn,qt=a(),Ne=n("ul"),Ne.innerHTML=$n,Yt=a(),xe=n("p"),xe.textContent=Cn,Ot=a(),$e=n("ul"),$e.innerHTML=Vn,Qt=a(),Ce=n("p"),Ce.innerHTML=In,Kt=a(),R=n("h2"),D=n("a"),Ft=n("span"),u(Ve.$$.fragment),Po=a(),at=n("span"),at.textContent=zn,eo=a(),Ie=n("p"),Ie.textContent=Fn,to=a(),u(ze.$$.fragment),oo=a(),Fe=n("ul"),Fe.innerHTML=jn,no=a(),je=n("p"),je.innerHTML=Un,so=a(),Ue=n("ul"),Ue.innerHTML=Sn,ro=a(),Se=n("p"),Se.textContent=Pn,ao=a(),W=n("h2"),G=n("a"),jt=n("span"),u(Pe.$$.fragment),ko=a(),it=n("span"),it.textContent=kn,io=a(),$=n("div"),u(ke.$$.fragment),Ro=a(),lt=n("p"),lt.innerHTML=Rn,Wo=a(),ct=n("p"),ct.innerHTML=Wn,Eo=a(),u(X.$$.fragment),lo=a(),E=n("h2"),q=n("a"),Ut=n("span"),u(Re.$$.fragment),Jo=a(),dt=n("span"),dt.textContent=En,co=a(),S=n("div"),u(We.$$.fragment),Zo=a(),Y=n("div"),u(Ee.$$.fragment),Lo=a(),mt=n("p"),mt.textContent=Jn,Ao=a(),O=n("div"),u(Je.$$.fragment),Ho=a(),pt=n("p"),pt.innerHTML=Zn,mo=a(),J=n("h2"),Q=n("a"),St=n("span"),u(Ze.$$.fragment),Bo=a(),ht=n("span"),ht.textContent=Ln,po=a(),C=n("div"),u(Le.$$.fragment),Do=a(),ft=n("p"),ft.textContent=An,Go=a(),K=n("div"),u(Ae.$$.fragment),Xo=a(),gt=n("p"),gt.textContent=Hn,qo=a(),ee=n("div"),u(He.$$.fragment),Yo=a(),ut=n("p"),ut.innerHTML=Bn,ho=a(),Z=n("h2"),te=n("a"),Pt=n("span"),u(Be.$$.fragment),Oo=a(),_t=n("span"),_t.textContent=Dn,fo=a(),P=n("div"),u(De.$$.fragment),Qo=a(),bt=n("p"),bt.innerHTML=Gn,Ko=a(),F=n("div"),u(Ge.$$.fragment),en=a(),vt=n("p"),vt.innerHTML=Xn,tn=a(),u(oe.$$.fragment),on=a(),u(ne.$$.fragment),go=a(),L=n("h2"),se=n("a"),kt=n("span"),u(Xe.$$.fragment),nn=a(),yt=n("span"),yt.textContent=qn,uo=a(),V=n("div"),u(qe.$$.fragment),sn=a(),Mt=n("p"),Mt.textContent=Yn,rn=a(),wt=n("p"),wt.innerHTML=On,an=a(),j=n("div"),u(Ye.$$.fragment),ln=a(),Tt=n("p"),Tt.innerHTML=Qn,cn=a(),u(re.$$.fragment),dn=a(),u(ae.$$.fragment),_o=a(),A=n("h2"),ie=n("a"),Rt=n("span"),u(Oe.$$.fragment),mn=a(),Nt=n("span"),Nt.textContent=Kn,bo=a(),I=n("div"),u(Qe.$$.fragment),pn=a(),xt=n("p"),xt.textContent=es,hn=a(),$t=n("p"),$t.innerHTML=ts,fn=a(),U=n("div"),u(Ke.$$.fragment),gn=a(),Ct=n("p"),Ct.innerHTML=os,un=a(),u(le.$$.fragment),_n=a(),u(ce.$$.fragment),vo=a(),Wt=n("p"),this.h()},l(e){const r=Ms("svelte-1phssyn",document.head);d=s(r,"META",{name:!0,content:!0}),r.forEach(t),T=i(e),h=s(e,"P",{}),g(h).forEach(t),f=i(e),w=s(e,"H1",{class:!0});var et=g(w);c=s(et,"A",{id:!0,class:!0,href:!0});var Et=g(c);N=s(Et,"SPAN",{});var Jt=g(N);_(_e.$$.fragment,Jt),Jt.forEach(t),Et.forEach(t),Uo=i(et),st=s(et,"SPAN",{"data-svelte-h":!0}),p(st)!=="svelte-19i3xoc"&&(st.textContent=vn),et.forEach(t),At=i(e),k=s(e,"H2",{class:!0});var tt=g(k);B=s(tt,"A",{id:!0,class:!0,href:!0});var Zt=g(B);zt=s(Zt,"SPAN",{});var Lt=g(zt);_(be.$$.fragment,Lt),Lt.forEach(t),Zt.forEach(t),So=i(tt),rt=s(tt,"SPAN",{"data-svelte-h":!0}),p(rt)!=="svelte-1jsw1pg"&&(rt.textContent=yn),tt.forEach(t),Ht=i(e),ve=s(e,"P",{"data-svelte-h":!0}),p(ve)!=="svelte-17rxl9l"&&(ve.innerHTML=Mn),Bt=i(e),ye=s(e,"P",{"data-svelte-h":!0}),p(ye)!=="svelte-vfdo9a"&&(ye.textContent=wn),Dt=i(e),Me=s(e,"P",{"data-svelte-h":!0}),p(Me)!=="svelte-8ynb3"&&(Me.innerHTML=Tn),Gt=i(e),we=s(e,"P",{"data-svelte-h":!0}),p(we)!=="svelte-1boky5r"&&(we.innerHTML=Nn),Xt=i(e),Te=s(e,"P",{"data-svelte-h":!0}),p(Te)!=="svelte-axv494"&&(Te.textContent=xn),qt=i(e),Ne=s(e,"UL",{"data-svelte-h":!0}),p(Ne)!=="svelte-18yhfoi"&&(Ne.innerHTML=$n),Yt=i(e),xe=s(e,"P",{"data-svelte-h":!0}),p(xe)!=="svelte-3u9dfs"&&(xe.textContent=Cn),Ot=i(e),$e=s(e,"UL",{"data-svelte-h":!0}),p($e)!=="svelte-iyk8d8"&&($e.innerHTML=Vn),Qt=i(e),Ce=s(e,"P",{"data-svelte-h":!0}),p(Ce)!=="svelte-1phamvp"&&(Ce.innerHTML=In),Kt=i(e),R=s(e,"H2",{class:!0});var ot=g(R);D=s(ot,"A",{id:!0,class:!0,href:!0});var ns=g(D);Ft=s(ns,"SPAN",{});var ss=g(Ft);_(Ve.$$.fragment,ss),ss.forEach(t),ns.forEach(t),Po=i(ot),at=s(ot,"SPAN",{"data-svelte-h":!0}),p(at)!=="svelte-w4zzv6"&&(at.textContent=zn),ot.forEach(t),eo=i(e),Ie=s(e,"P",{"data-svelte-h":!0}),p(Ie)!=="svelte-1s4mgd4"&&(Ie.textContent=Fn),to=i(e),_(ze.$$.fragment,e),oo=i(e),Fe=s(e,"UL",{"data-svelte-h":!0}),p(Fe)!=="svelte-aphftz"&&(Fe.innerHTML=jn),no=i(e),je=s(e,"P",{"data-svelte-h":!0}),p(je)!=="svelte-1qspi63"&&(je.innerHTML=Un),so=i(e),Ue=s(e,"UL",{"data-svelte-h":!0}),p(Ue)!=="svelte-bnel3y"&&(Ue.innerHTML=Sn),ro=i(e),Se=s(e,"P",{"data-svelte-h":!0}),p(Se)!=="svelte-1xesile"&&(Se.textContent=Pn),ao=i(e),W=s(e,"H2",{class:!0});var Mo=g(W);G=s(Mo,"A",{id:!0,class:!0,href:!0});var rs=g(G);jt=s(rs,"SPAN",{});var as=g(jt);_(Pe.$$.fragment,as),as.forEach(t),rs.forEach(t),ko=i(Mo),it=s(Mo,"SPAN",{"data-svelte-h":!0}),p(it)!=="svelte-1t6ozwg"&&(it.textContent=kn),Mo.forEach(t),io=i(e),$=s(e,"DIV",{class:!0});var de=g($);_(ke.$$.fragment,de),Ro=i(de),lt=s(de,"P",{"data-svelte-h":!0}),p(lt)!=="svelte-f5tv1f"&&(lt.innerHTML=Rn),Wo=i(de),ct=s(de,"P",{"data-svelte-h":!0}),p(ct)!=="svelte-10kqkkl"&&(ct.innerHTML=Wn),Eo=i(de),_(X.$$.fragment,de),de.forEach(t),lo=i(e),E=s(e,"H2",{class:!0});var wo=g(E);q=s(wo,"A",{id:!0,class:!0,href:!0});var is=g(q);Ut=s(is,"SPAN",{});var ls=g(Ut);_(Re.$$.fragment,ls),ls.forEach(t),is.forEach(t),Jo=i(wo),dt=s(wo,"SPAN",{"data-svelte-h":!0}),p(dt)!=="svelte-lucutg"&&(dt.textContent=En),wo.forEach(t),co=i(e),S=s(e,"DIV",{class:!0});var Vt=g(S);_(We.$$.fragment,Vt),Zo=i(Vt),Y=s(Vt,"DIV",{class:!0});var To=g(Y);_(Ee.$$.fragment,To),Lo=i(To),mt=s(To,"P",{"data-svelte-h":!0}),p(mt)!=="svelte-1x3yxsa"&&(mt.textContent=Jn),To.forEach(t),Ao=i(Vt),O=s(Vt,"DIV",{class:!0});var No=g(O);_(Je.$$.fragment,No),Ho=i(No),pt=s(No,"P",{"data-svelte-h":!0}),p(pt)!=="svelte-vvdmgy"&&(pt.innerHTML=Zn),No.forEach(t),Vt.forEach(t),mo=i(e),J=s(e,"H2",{class:!0});var xo=g(J);Q=s(xo,"A",{id:!0,class:!0,href:!0});var cs=g(Q);St=s(cs,"SPAN",{});var ds=g(St);_(Ze.$$.fragment,ds),ds.forEach(t),cs.forEach(t),Bo=i(xo),ht=s(xo,"SPAN",{"data-svelte-h":!0}),p(ht)!=="svelte-1vj6zvt"&&(ht.textContent=Ln),xo.forEach(t),po=i(e),C=s(e,"DIV",{class:!0});var me=g(C);_(Le.$$.fragment,me),Do=i(me),ft=s(me,"P",{"data-svelte-h":!0}),p(ft)!=="svelte-byi2j1"&&(ft.textContent=An),Go=i(me),K=s(me,"DIV",{class:!0});var $o=g(K);_(Ae.$$.fragment,$o),Xo=i($o),gt=s($o,"P",{"data-svelte-h":!0}),p(gt)!=="svelte-1x3yxsa"&&(gt.textContent=Hn),$o.forEach(t),qo=i(me),ee=s(me,"DIV",{class:!0});var Co=g(ee);_(He.$$.fragment,Co),Yo=i(Co),ut=s(Co,"P",{"data-svelte-h":!0}),p(ut)!=="svelte-vvdmgy"&&(ut.innerHTML=Bn),Co.forEach(t),me.forEach(t),ho=i(e),Z=s(e,"H2",{class:!0});var Vo=g(Z);te=s(Vo,"A",{id:!0,class:!0,href:!0});var ms=g(te);Pt=s(ms,"SPAN",{});var ps=g(Pt);_(Be.$$.fragment,ps),ps.forEach(t),ms.forEach(t),Oo=i(Vo),_t=s(Vo,"SPAN",{"data-svelte-h":!0}),p(_t)!=="svelte-11v4kg7"&&(_t.textContent=Dn),Vo.forEach(t),fo=i(e),P=s(e,"DIV",{class:!0});var It=g(P);_(De.$$.fragment,It),Qo=i(It),bt=s(It,"P",{"data-svelte-h":!0}),p(bt)!=="svelte-xugesj"&&(bt.innerHTML=Gn),Ko=i(It),F=s(It,"DIV",{class:!0});var pe=g(F);_(Ge.$$.fragment,pe),en=i(pe),vt=s(pe,"P",{"data-svelte-h":!0}),p(vt)!=="svelte-mksi2z"&&(vt.innerHTML=Xn),tn=i(pe),_(oe.$$.fragment,pe),on=i(pe),_(ne.$$.fragment,pe),pe.forEach(t),It.forEach(t),go=i(e),L=s(e,"H2",{class:!0});var Io=g(L);se=s(Io,"A",{id:!0,class:!0,href:!0});var hs=g(se);kt=s(hs,"SPAN",{});var fs=g(kt);_(Xe.$$.fragment,fs),fs.forEach(t),hs.forEach(t),nn=i(Io),yt=s(Io,"SPAN",{"data-svelte-h":!0}),p(yt)!=="svelte-dnb656"&&(yt.textContent=qn),Io.forEach(t),uo=i(e),V=s(e,"DIV",{class:!0});var he=g(V);_(qe.$$.fragment,he),sn=i(he),Mt=s(he,"P",{"data-svelte-h":!0}),p(Mt)!=="svelte-1cewssh"&&(Mt.textContent=Yn),rn=i(he),wt=s(he,"P",{"data-svelte-h":!0}),p(wt)!=="svelte-1gjh92c"&&(wt.innerHTML=On),an=i(he),j=s(he,"DIV",{class:!0});var fe=g(j);_(Ye.$$.fragment,fe),ln=i(fe),Tt=s(fe,"P",{"data-svelte-h":!0}),p(Tt)!=="svelte-1u3nznv"&&(Tt.innerHTML=Qn),cn=i(fe),_(re.$$.fragment,fe),dn=i(fe),_(ae.$$.fragment,fe),fe.forEach(t),he.forEach(t),_o=i(e),A=s(e,"H2",{class:!0});var zo=g(A);ie=s(zo,"A",{id:!0,class:!0,href:!0});var gs=g(ie);Rt=s(gs,"SPAN",{});var us=g(Rt);_(Oe.$$.fragment,us),us.forEach(t),gs.forEach(t),mn=i(zo),Nt=s(zo,"SPAN",{"data-svelte-h":!0}),p(Nt)!=="svelte-b5l5iv"&&(Nt.textContent=Kn),zo.forEach(t),bo=i(e),I=s(e,"DIV",{class:!0});var ge=g(I);_(Qe.$$.fragment,ge),pn=i(ge),xt=s(ge,"P",{"data-svelte-h":!0}),p(xt)!=="svelte-7ygchu"&&(xt.textContent=es),hn=i(ge),$t=s(ge,"P",{"data-svelte-h":!0}),p($t)!=="svelte-1gjh92c"&&($t.innerHTML=ts),fn=i(ge),U=s(ge,"DIV",{class:!0});var ue=g(U);_(Ke.$$.fragment,ue),gn=i(ue),Ct=s(ue,"P",{"data-svelte-h":!0}),p(Ct)!=="svelte-9e2463"&&(Ct.innerHTML=os),un=i(ue),_(le.$$.fragment,ue),_n=i(ue),_(ce.$$.fragment,ue),ue.forEach(t),ge.forEach(t),vo=i(e),Wt=s(e,"P",{}),g(Wt).forEach(t),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(Fs)),m(c,"id","mobilenet-v2"),m(c,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(c,"href","#mobilenet-v2"),m(w,"class","relative group"),m(B,"id","overview"),m(B,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(B,"href","#overview"),m(k,"class","relative group"),m(D,"id","resources"),m(D,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(D,"href","#resources"),m(R,"class","relative group"),m(G,"id","transformers.MobileNetV2Config"),m(G,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(G,"href","#transformers.MobileNetV2Config"),m(W,"class","relative group"),m($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(q,"id","transformers.MobileNetV2FeatureExtractor"),m(q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(q,"href","#transformers.MobileNetV2FeatureExtractor"),m(E,"class","relative group"),m(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(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Q,"id","transformers.MobileNetV2ImageProcessor"),m(Q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Q,"href","#transformers.MobileNetV2ImageProcessor"),m(J,"class","relative group"),m(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(te,"id","transformers.MobileNetV2Model"),m(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(te,"href","#transformers.MobileNetV2Model"),m(Z,"class","relative group"),m(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(se,"id","transformers.MobileNetV2ForImageClassification"),m(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(se,"href","#transformers.MobileNetV2ForImageClassification"),m(L,"class","relative group"),m(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ie,"id","transformers.MobileNetV2ForSemanticSegmentation"),m(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(ie,"href","#transformers.MobileNetV2ForSemanticSegmentation"),m(A,"class","relative group"),m(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,r){o(document.head,d),l(e,T,r),l(e,h,r),l(e,f,r),l(e,w,r),o(w,c),o(c,N),b(_e,N,null),o(w,Uo),o(w,st),l(e,At,r),l(e,k,r),o(k,B),o(B,zt),b(be,zt,null),o(k,So),o(k,rt),l(e,Ht,r),l(e,ve,r),l(e,Bt,r),l(e,ye,r),l(e,Dt,r),l(e,Me,r),l(e,Gt,r),l(e,we,r),l(e,Xt,r),l(e,Te,r),l(e,qt,r),l(e,Ne,r),l(e,Yt,r),l(e,xe,r),l(e,Ot,r),l(e,$e,r),l(e,Qt,r),l(e,Ce,r),l(e,Kt,r),l(e,R,r),o(R,D),o(D,Ft),b(Ve,Ft,null),o(R,Po),o(R,at),l(e,eo,r),l(e,Ie,r),l(e,to,r),b(ze,e,r),l(e,oo,r),l(e,Fe,r),l(e,no,r),l(e,je,r),l(e,so,r),l(e,Ue,r),l(e,ro,r),l(e,Se,r),l(e,ao,r),l(e,W,r),o(W,G),o(G,jt),b(Pe,jt,null),o(W,ko),o(W,it),l(e,io,r),l(e,$,r),b(ke,$,null),o($,Ro),o($,lt),o($,Wo),o($,ct),o($,Eo),b(X,$,null),l(e,lo,r),l(e,E,r),o(E,q),o(q,Ut),b(Re,Ut,null),o(E,Jo),o(E,dt),l(e,co,r),l(e,S,r),b(We,S,null),o(S,Zo),o(S,Y),b(Ee,Y,null),o(Y,Lo),o(Y,mt),o(S,Ao),o(S,O),b(Je,O,null),o(O,Ho),o(O,pt),l(e,mo,r),l(e,J,r),o(J,Q),o(Q,St),b(Ze,St,null),o(J,Bo),o(J,ht),l(e,po,r),l(e,C,r),b(Le,C,null),o(C,Do),o(C,ft),o(C,Go),o(C,K),b(Ae,K,null),o(K,Xo),o(K,gt),o(C,qo),o(C,ee),b(He,ee,null),o(ee,Yo),o(ee,ut),l(e,ho,r),l(e,Z,r),o(Z,te),o(te,Pt),b(Be,Pt,null),o(Z,Oo),o(Z,_t),l(e,fo,r),l(e,P,r),b(De,P,null),o(P,Qo),o(P,bt),o(P,Ko),o(P,F),b(Ge,F,null),o(F,en),o(F,vt),o(F,tn),b(oe,F,null),o(F,on),b(ne,F,null),l(e,go,r),l(e,L,r),o(L,se),o(se,kt),b(Xe,kt,null),o(L,nn),o(L,yt),l(e,uo,r),l(e,V,r),b(qe,V,null),o(V,sn),o(V,Mt),o(V,rn),o(V,wt),o(V,an),o(V,j),b(Ye,j,null),o(j,ln),o(j,Tt),o(j,cn),b(re,j,null),o(j,dn),b(ae,j,null),l(e,_o,r),l(e,A,r),o(A,ie),o(ie,Rt),b(Oe,Rt,null),o(A,mn),o(A,Nt),l(e,bo,r),l(e,I,r),b(Qe,I,null),o(I,pn),o(I,xt),o(I,hn),o(I,$t),o(I,fn),o(I,U),b(Ke,U,null),o(U,gn),o(U,Ct),o(U,un),b(le,U,null),o(U,_n),b(ce,U,null),l(e,vo,r),l(e,Wt,r),yo=!0},p(e,[r]){const et={};r&2&&(et.$$scope={dirty:r,ctx:e}),X.$set(et);const Et={};r&2&&(Et.$$scope={dirty:r,ctx:e}),oe.$set(Et);const Jt={};r&2&&(Jt.$$scope={dirty:r,ctx:e}),ne.$set(Jt);const tt={};r&2&&(tt.$$scope={dirty:r,ctx:e}),re.$set(tt);const Zt={};r&2&&(Zt.$$scope={dirty:r,ctx:e}),ae.$set(Zt);const Lt={};r&2&&(Lt.$$scope={dirty:r,ctx:e}),le.$set(Lt);const ot={};r&2&&(ot.$$scope={dirty:r,ctx:e}),ce.$set(ot)},i(e){yo||(v(_e.$$.fragment,e),v(be.$$.fragment,e),v(Ve.$$.fragment,e),v(ze.$$.fragment,e),v(Pe.$$.fragment,e),v(ke.$$.fragment,e),v(X.$$.fragment,e),v(Re.$$.fragment,e),v(We.$$.fragment,e),v(Ee.$$.fragment,e),v(Je.$$.fragment,e),v(Ze.$$.fragment,e),v(Le.$$.fragment,e),v(Ae.$$.fragment,e),v(He.$$.fragment,e),v(Be.$$.fragment,e),v(De.$$.fragment,e),v(Ge.$$.fragment,e),v(oe.$$.fragment,e),v(ne.$$.fragment,e),v(Xe.$$.fragment,e),v(qe.$$.fragment,e),v(Ye.$$.fragment,e),v(re.$$.fragment,e),v(ae.$$.fragment,e),v(Oe.$$.fragment,e),v(Qe.$$.fragment,e),v(Ke.$$.fragment,e),v(le.$$.fragment,e),v(ce.$$.fragment,e),yo=!0)},o(e){y(_e.$$.fragment,e),y(be.$$.fragment,e),y(Ve.$$.fragment,e),y(ze.$$.fragment,e),y(Pe.$$.fragment,e),y(ke.$$.fragment,e),y(X.$$.fragment,e),y(Re.$$.fragment,e),y(We.$$.fragment,e),y(Ee.$$.fragment,e),y(Je.$$.fragment,e),y(Ze.$$.fragment,e),y(Le.$$.fragment,e),y(Ae.$$.fragment,e),y(He.$$.fragment,e),y(Be.$$.fragment,e),y(De.$$.fragment,e),y(Ge.$$.fragment,e),y(oe.$$.fragment,e),y(ne.$$.fragment,e),y(Xe.$$.fragment,e),y(qe.$$.fragment,e),y(Ye.$$.fragment,e),y(re.$$.fragment,e),y(ae.$$.fragment,e),y(Oe.$$.fragment,e),y(Qe.$$.fragment,e),y(Ke.$$.fragment,e),y(le.$$.fragment,e),y(ce.$$.fragment,e),yo=!1},d(e){e&&(t(T),t(h),t(f),t(w),t(At),t(k),t(Ht),t(ve),t(Bt),t(ye),t(Dt),t(Me),t(Gt),t(we),t(Xt),t(Te),t(qt),t(Ne),t(Yt),t(xe),t(Ot),t($e),t(Qt),t(Ce),t(Kt),t(R),t(eo),t(Ie),t(to),t(oo),t(Fe),t(no),t(je),t(so),t(Ue),t(ro),t(Se),t(ao),t(W),t(io),t($),t(lo),t(E),t(co),t(S),t(mo),t(J),t(po),t(C),t(ho),t(Z),t(fo),t(P),t(go),t(L),t(uo),t(V),t(_o),t(A),t(bo),t(I),t(vo),t(Wt)),t(d),M(_e),M(be),M(Ve),M(ze,e),M(Pe),M(ke),M(X),M(Re),M(We),M(Ee),M(Je),M(Ze),M(Le),M(Ae),M(He),M(Be),M(De),M(Ge),M(oe),M(ne),M(Xe),M(qe),M(Ye),M(re),M(ae),M(Oe),M(Qe),M(Ke),M(le),M(ce)}}}const Fs={local:"mobilenet-v2",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.MobileNetV2Config",title:"MobileNetV2Config"},{local:"transformers.MobileNetV2FeatureExtractor",title:"MobileNetV2FeatureExtractor"},{local:"transformers.MobileNetV2ImageProcessor",title:"MobileNetV2ImageProcessor"},{local:"transformers.MobileNetV2Model",title:"MobileNetV2Model"},{local:"transformers.MobileNetV2ForImageClassification",title:"MobileNetV2ForImageClassification"},{local:"transformers.MobileNetV2ForSemanticSegmentation",title:"MobileNetV2ForSemanticSegmentation"}],title:"MobileNet V2"};function js(x){return bs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zs extends vs{constructor(d){super(),ys(this,d,js,zs,_s,{})}}export{Zs as component};
