import{S as Yn,i as Jn,s as Kn,e as r,k as m,w as v,t as n,M as Qn,c as a,d as t,m as p,a as s,x as y,h as i,b as l,G as e,g as f,y as w,q as N,o as M,B as $,v as Xn,L as Is}from"../../chunks/vendor-hf-doc-builder.js";import{T as Gn}from"../../chunks/Tip-hf-doc-builder.js";import{D as ee}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Es}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ne}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ts}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as Zn}from"../../chunks/PipelineTag-hf-doc-builder.js";function ei(P){let h,T,_,g,b;return g=new Es({props:{code:`from transformers import MobileNetV1Config, MobileNetV1Model

# Initializing a "mobilenet_v1_1.0_224" style configuration
configuration = MobileNetV1Config()

# Initializing a model from the "mobilenet_v1_1.0_224" style configuration
model = MobileNetV1Model(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MobileNetV1Config, MobileNetV1Model

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the &quot;mobilenet_v1_1.0_224&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileNetV1Model(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`}}),{c(){h=r("p"),T=n("Example:"),_=m(),v(g.$$.fragment)},l(c){h=a(c,"P",{});var u=s(h);T=i(u,"Example:"),u.forEach(t),_=p(c),y(g.$$.fragment,c)},m(c,u){f(c,h,u),e(h,T),f(c,_,u),w(g,c,u),b=!0},p:Is,i(c){b||(N(g.$$.fragment,c),b=!0)},o(c){M(g.$$.fragment,c),b=!1},d(c){c&&t(h),c&&t(_),$(g,c)}}}function oi(P){let h,T,_,g,b;return{c(){h=r("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r("code"),g=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(c){h=a(c,"P",{});var u=s(h);T=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var k=s(_);g=i(k,"Module"),k.forEach(t),b=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(c,u){f(c,h,u),e(h,T),e(h,_),e(_,g),e(h,b)},d(c){c&&t(h)}}}function ti(P){let h,T,_,g,b;return g=new Es({props:{code:`from transformers import AutoImageProcessor, MobileNetV1Model
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

image_processor = AutoImageProcessor.from_pretrained("google/mobilenet_v1_1.0_224")
model = MobileNetV1Model.from_pretrained("google/mobilenet_v1_1.0_224")

inputs = image_processor(image, return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, MobileNetV1Model
<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_v1_1.0_224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileNetV1Model.from_pretrained(<span class="hljs-string">&quot;google/mobilenet_v1_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">1024</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`}}),{c(){h=r("p"),T=n("Example:"),_=m(),v(g.$$.fragment)},l(c){h=a(c,"P",{});var u=s(h);T=i(u,"Example:"),u.forEach(t),_=p(c),y(g.$$.fragment,c)},m(c,u){f(c,h,u),e(h,T),f(c,_,u),w(g,c,u),b=!0},p:Is,i(c){b||(N(g.$$.fragment,c),b=!0)},o(c){M(g.$$.fragment,c),b=!1},d(c){c&&t(h),c&&t(_),$(g,c)}}}function ri(P){let h,T,_,g,b;return{c(){h=r("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r("code"),g=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(c){h=a(c,"P",{});var u=s(h);T=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var k=s(_);g=i(k,"Module"),k.forEach(t),b=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(c,u){f(c,h,u),e(h,T),e(h,_),e(_,g),e(h,b)},d(c){c&&t(h)}}}function ai(P){let h,T,_,g,b;return g=new Es({props:{code:`from transformers import AutoImageProcessor, MobileNetV1ForImageClassification
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

image_processor = AutoImageProcessor.from_pretrained("google/mobilenet_v1_1.0_224")
model = MobileNetV1ForImageClassification.from_pretrained("google/mobilenet_v1_1.0_224")

inputs = image_processor(image, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# model predicts one of the 1000 ImageNet classes
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, MobileNetV1ForImageClassification
<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_v1_1.0_224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileNetV1ForImageClassification.from_pretrained(<span class="hljs-string">&quot;google/mobilenet_v1_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`}}),{c(){h=r("p"),T=n("Example:"),_=m(),v(g.$$.fragment)},l(c){h=a(c,"P",{});var u=s(h);T=i(u,"Example:"),u.forEach(t),_=p(c),y(g.$$.fragment,c)},m(c,u){f(c,h,u),e(h,T),f(c,_,u),w(g,c,u),b=!0},p:Is,i(c){b||(N(g.$$.fragment,c),b=!0)},o(c){M(g.$$.fragment,c),b=!1},d(c){c&&t(h),c&&t(_),$(g,c)}}}function si(P){let h,T,_,g,b,c,u,k,lr,yt,S,oe,Po,Me,cr,zo,dr,wt,te,mr,$e,pr,fr,Nt,so,hr,Mt,no,Co,gr,$t,io,ur,Tt,I,Fo,E,_r,re,br,ko,vr,yr,Ao,wr,Nr,jo,Mr,$r,Lo,Tr,Ir,Do,Er,Vr,xr,Ro,qo,Pr,zr,So,Te,Cr,lo,Fr,kr,Ar,Oo,Ie,jr,Ee,Lr,Dr,Rr,Wo,O,qr,co,Sr,Or,Uo,Wr,Ur,It,mo,Hr,Et,z,Ho,Ve,Br,po,Gr,Yr,Jr,Bo,xe,Kr,Go,Qr,Xr,Zr,Yo,Jo,ea,oa,Ko,Pe,ta,Qo,ra,aa,Vt,L,sa,ze,na,ia,Ce,la,ca,xt,W,ae,Xo,Fe,da,Zo,ma,Pt,fo,pa,zt,ke,Ct,ho,D,go,fa,ha,Ae,ga,ua,je,_a,ba,Ft,uo,va,kt,U,se,et,Le,ya,ot,wa,At,V,De,Na,H,Ma,_o,$a,Ta,Re,Ia,Ea,Va,B,xa,bo,Pa,za,vo,Ca,Fa,ka,ne,jt,G,ie,tt,qe,Aa,rt,ja,Lt,Y,Se,La,le,Oe,Da,at,Ra,Dt,J,ce,st,We,qa,nt,Sa,Rt,A,Ue,Oa,it,Wa,Ua,de,He,Ha,lt,Ba,qt,K,me,ct,Be,Ga,dt,Ya,St,j,Ge,Ja,Ye,Ka,Je,Qa,Xa,Za,C,Ke,es,Q,os,yo,ts,rs,mt,as,ss,ns,pe,is,fe,Ot,X,he,pt,Qe,ls,ft,cs,Wt,x,Xe,ds,ht,ms,ps,Ze,fs,eo,hs,gs,us,F,oo,_s,Z,bs,wo,vs,ys,gt,ws,Ns,Ms,ge,$s,ue,Ut;return c=new Ne({}),Me=new Ne({}),Fe=new Ne({}),ke=new Zn({props:{pipeline:"image-classification"}}),Le=new Ne({}),De=new ee({props:{name:"class transformers.MobileNetV1Config",anchor:"transformers.MobileNetV1Config",parameters:[{name:"num_channels",val:" = 3"},{name:"image_size",val:" = 224"},{name:"depth_multiplier",val:" = 1.0"},{name:"min_depth",val:" = 8"},{name:"hidden_act",val:" = 'relu6'"},{name:"tf_padding",val:" = True"},{name:"classifier_dropout_prob",val:" = 0.999"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 0.001"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileNetV1Config.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.MobileNetV1Config.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.MobileNetV1Config.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.MobileNetV1Config.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.MobileNetV1Config.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.MobileNetV1Config.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.MobileNetV1Config.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.MobileNetV1Config.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.MobileNetV1Config.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mobilenet_v1/configuration_mobilenet_v1.py#L36"}}),ne=new Ts({props:{anchor:"transformers.MobileNetV1Config.example",$$slots:{default:[ei]},$$scope:{ctx:P}}}),qe=new Ne({}),Se=new ee({props:{name:"class transformers.MobileNetV1FeatureExtractor",anchor:"transformers.MobileNetV1FeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mobilenet_v1/feature_extraction_mobilenet_v1.py#L26"}}),Oe=new ee({props:{name:"preprocess",anchor:"transformers.MobileNetV1FeatureExtractor.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[transformers.utils.generic.TensorType, str, NoneType] = None"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileNetV1FeatureExtractor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess.`,name:"images"},{anchor:"transformers.MobileNetV1FeatureExtractor.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.MobileNetV1FeatureExtractor.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.MobileNetV1FeatureExtractor.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.MobileNetV1FeatureExtractor.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.MobileNetV1FeatureExtractor.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.MobileNetV1FeatureExtractor.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.MobileNetV1FeatureExtractor.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.MobileNetV1FeatureExtractor.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.MobileNetV1FeatureExtractor.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.MobileNetV1FeatureExtractor.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.MobileNetV1FeatureExtractor.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.MobileNetV1FeatureExtractor.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mobilenet_v1/image_processing_mobilenet_v1.py#L220"}}),We=new Ne({}),Ue=new ee({props:{name:"class transformers.MobileNetV1ImageProcessor",anchor:"transformers.MobileNetV1ImageProcessor",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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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/main/src/transformers/models/mobilenet_v1/image_processing_mobilenet_v1.py#L48"}}),He=new ee({props:{name:"preprocess",anchor:"transformers.MobileNetV1ImageProcessor.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[transformers.utils.generic.TensorType, str, NoneType] = None"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileNetV1ImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess.`,name:"images"},{anchor:"transformers.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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.MobileNetV1ImageProcessor.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/mobilenet_v1/image_processing_mobilenet_v1.py#L220"}}),Be=new Ne({}),Ge=new ee({props:{name:"class transformers.MobileNetV1Model",anchor:"transformers.MobileNetV1Model",parameters:[{name:"config",val:": MobileNetV1Config"},{name:"add_pooling_layer",val:": bool = True"}],parametersDescription:[{anchor:"transformers.MobileNetV1Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mobilenet_v1#transformers.MobileNetV1Config">MobileNetV1Config</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/mobilenet_v1/modeling_mobilenet_v1.py#L301"}}),Ke=new ee({props:{name:"forward",anchor:"transformers.MobileNetV1Model.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.MobileNetV1Model.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/poolformer#transformers.PoolFormerFeatureExtractor.__call__">MobileNetV1ImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.MobileNetV1Model.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.MobileNetV1Model.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/mobilenet_v1/modeling_mobilenet_v1.py#L355",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/main/en/model_doc/mobilenet_v1#transformers.MobileNetV1Config"
>MobileNetV1Config</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>) \u2014 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>) \u2014 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>) \u2014 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>
`}}),pe=new Gn({props:{$$slots:{default:[oi]},$$scope:{ctx:P}}}),fe=new Ts({props:{anchor:"transformers.MobileNetV1Model.forward.example",$$slots:{default:[ti]},$$scope:{ctx:P}}}),Qe=new Ne({}),Xe=new ee({props:{name:"class transformers.MobileNetV1ForImageClassification",anchor:"transformers.MobileNetV1ForImageClassification",parameters:[{name:"config",val:": MobileNetV1Config"}],parametersDescription:[{anchor:"transformers.MobileNetV1ForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/mobilenet_v1#transformers.MobileNetV1Config">MobileNetV1Config</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/mobilenet_v1/modeling_mobilenet_v1.py#L411"}}),oo=new ee({props:{name:"forward",anchor:"transformers.MobileNetV1ForImageClassification.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.MobileNetV1ForImageClassification.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/poolformer#transformers.PoolFormerFeatureExtractor.__call__">MobileNetV1ImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.MobileNetV1ForImageClassification.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.MobileNetV1ForImageClassification.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.MobileNetV1ForImageClassification.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/mobilenet_v1/modeling_mobilenet_v1.py#L427",returnDescription:`
<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/mobilenet_v1#transformers.MobileNetV1Config"
>MobileNetV1Config</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) \u2014 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>) \u2014 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>) \u2014 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/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ge=new Gn({props:{$$slots:{default:[ri]},$$scope:{ctx:P}}}),ue=new Ts({props:{anchor:"transformers.MobileNetV1ForImageClassification.forward.example",$$slots:{default:[ai]},$$scope:{ctx:P}}}),{c(){h=r("meta"),T=m(),_=r("h1"),g=r("a"),b=r("span"),v(c.$$.fragment),u=m(),k=r("span"),lr=n("MobileNet V1"),yt=m(),S=r("h2"),oe=r("a"),Po=r("span"),v(Me.$$.fragment),cr=m(),zo=r("span"),dr=n("Overview"),wt=m(),te=r("p"),mr=n("The MobileNet model was proposed in "),$e=r("a"),pr=n("MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications"),fr=n(" by Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam."),Nt=m(),so=r("p"),hr=n("The abstract from the paper is the following:"),Mt=m(),no=r("p"),Co=r("em"),gr=n("We present a class of efficient models called MobileNets for mobile and embedded vision applications. MobileNets are based on a streamlined architecture that uses depth-wise separable convolutions to build light weight deep neural networks. We introduce two simple global hyper-parameters that efficiently trade off between latency and accuracy. These hyper-parameters allow the model builder to choose the right sized model for their application based on the constraints of the problem. We present extensive experiments on resource and accuracy tradeoffs and show strong performance compared to other popular models on ImageNet classification. We then demonstrate the effectiveness of MobileNets across a wide range of applications and use cases including object detection, finegrain classification, face attributes and large scale geo-localization."),$t=m(),io=r("p"),ur=n("Tips:"),Tt=m(),I=r("ul"),Fo=r("li"),E=r("p"),_r=n("The checkpoints are named "),re=r("strong"),br=n("mobilenet_v1_"),ko=r("em"),vr=n("depth"),yr=n("_"),Ao=r("em"),wr=n("size"),Nr=n(", for example "),jo=r("strong"),Mr=n("mobilenet_v1_1.0_224"),$r=n(", where "),Lo=r("strong"),Tr=n("1.0"),Ir=n(" is the depth multiplier (sometimes also referred to as \u201Calpha\u201D or the width multiplier) and "),Do=r("strong"),Er=n("224"),Vr=n(" is the resolution of the input images the model was trained on."),xr=m(),Ro=r("li"),qo=r("p"),Pr=n("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."),zr=m(),So=r("li"),Te=r("p"),Cr=n("One can use "),lo=r("a"),Fr=n("MobileNetV1ImageProcessor"),kr=n(" to prepare images for the model."),Ar=m(),Oo=r("li"),Ie=r("p"),jr=n("The available image classification checkpoints are pre-trained on "),Ee=r("a"),Lr=n("ImageNet-1k"),Dr=n(" (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 \u201Cbackground\u201D class (index 0)."),Rr=m(),Wo=r("li"),O=r("p"),qr=n("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 "),co=r("a"),Sr=n("MobileNetV1Config"),Or=n(" with "),Uo=r("code"),Wr=n("tf_padding = False"),Ur=n("."),It=m(),mo=r("p"),Hr=n("Unsupported features:"),Et=m(),z=r("ul"),Ho=r("li"),Ve=r("p"),Br=n("The "),po=r("a"),Gr=n("MobileNetV1Model"),Yr=n(" outputs a globally pooled version of the last hidden state. In the original model it is possible to use a 7x7 average pooling layer with stride 2 instead of global pooling. For larger inputs, this gives a pooled output that is larger than 1x1 pixel. The HuggingFace implementation does not support this."),Jr=m(),Bo=r("li"),xe=r("p"),Kr=n("It is currently not possible to specify an "),Go=r("code"),Qr=n("output_stride"),Xr=n(". For smaller output strides, the original model invokes dilated convolution to prevent the spatial resolution from being reduced further. The output stride of the HuggingFace model is always 32."),Zr=m(),Yo=r("li"),Jo=r("p"),ea=n("The original TensorFlow checkpoints include quantized models. We do not support these models as they include additional \u201CFakeQuantization\u201D operations to unquantize the weights."),oa=m(),Ko=r("li"),Pe=r("p"),ta=n("It\u2019s common to extract the output from the pointwise layers at indices 5, 11, 12, 13 for downstream purposes. Using "),Qo=r("code"),ra=n("output_hidden_states=True"),aa=n(" returns the output from all intermediate layers. There is currently no way to limit this to specific layers."),Vt=m(),L=r("p"),sa=n("This model was contributed by "),ze=r("a"),na=n("matthijs"),ia=n(". The original code and weights can be found "),Ce=r("a"),la=n("here"),ca=n("."),xt=m(),W=r("h2"),ae=r("a"),Xo=r("span"),v(Fe.$$.fragment),da=m(),Zo=r("span"),ma=n("Resources"),Pt=m(),fo=r("p"),pa=n("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with MobileNetV1."),zt=m(),v(ke.$$.fragment),Ct=m(),ho=r("ul"),D=r("li"),go=r("a"),fa=n("MobileNetV1ForImageClassification"),ha=n(" is supported by this "),Ae=r("a"),ga=n("example script"),ua=n(" and "),je=r("a"),_a=n("notebook"),ba=n("."),Ft=m(),uo=r("p"),va=n("If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),kt=m(),U=r("h2"),se=r("a"),et=r("span"),v(Le.$$.fragment),ya=m(),ot=r("span"),wa=n("MobileNetV1Config"),At=m(),V=r("div"),v(De.$$.fragment),Na=m(),H=r("p"),Ma=n("This is the configuration class to store the configuration of a "),_o=r("a"),$a=n("MobileNetV1Model"),Ta=n(`. It is used to instantiate a
MobileNetV1 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 MobileNetV1
`),Re=r("a"),Ia=n("google/mobilenet_v1_1.0_224"),Ea=n(" architecture."),Va=m(),B=r("p"),xa=n("Configuration objects inherit from "),bo=r("a"),Pa=n("PretrainedConfig"),za=n(` and can be used to control the model outputs. Read the
documentation from `),vo=r("a"),Ca=n("PretrainedConfig"),Fa=n(" for more information."),ka=m(),v(ne.$$.fragment),jt=m(),G=r("h2"),ie=r("a"),tt=r("span"),v(qe.$$.fragment),Aa=m(),rt=r("span"),ja=n("MobileNetV1FeatureExtractor"),Lt=m(),Y=r("div"),v(Se.$$.fragment),La=m(),le=r("div"),v(Oe.$$.fragment),Da=m(),at=r("p"),Ra=n("Preprocess an image or batch of images."),Dt=m(),J=r("h2"),ce=r("a"),st=r("span"),v(We.$$.fragment),qa=m(),nt=r("span"),Sa=n("MobileNetV1ImageProcessor"),Rt=m(),A=r("div"),v(Ue.$$.fragment),Oa=m(),it=r("p"),Wa=n("Constructs a MobileNetV1 image processor."),Ua=m(),de=r("div"),v(He.$$.fragment),Ha=m(),lt=r("p"),Ba=n("Preprocess an image or batch of images."),qt=m(),K=r("h2"),me=r("a"),ct=r("span"),v(Be.$$.fragment),Ga=m(),dt=r("span"),Ya=n("MobileNetV1Model"),St=m(),j=r("div"),v(Ge.$$.fragment),Ja=m(),Ye=r("p"),Ka=n(`The bare MobileNetV1 model outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Je=r("a"),Qa=n("torch.nn.Module"),Xa=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Za=m(),C=r("div"),v(Ke.$$.fragment),es=m(),Q=r("p"),os=n("The "),yo=r("a"),ts=n("MobileNetV1Model"),rs=n(" forward method, overrides the "),mt=r("code"),as=n("__call__"),ss=n(" special method."),ns=m(),v(pe.$$.fragment),is=m(),v(fe.$$.fragment),Ot=m(),X=r("h2"),he=r("a"),pt=r("span"),v(Qe.$$.fragment),ls=m(),ft=r("span"),cs=n("MobileNetV1ForImageClassification"),Wt=m(),x=r("div"),v(Xe.$$.fragment),ds=m(),ht=r("p"),ms=n(`MobileNetV1 model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),ps=m(),Ze=r("p"),fs=n("This model is a PyTorch "),eo=r("a"),hs=n("torch.nn.Module"),gs=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),us=m(),F=r("div"),v(oo.$$.fragment),_s=m(),Z=r("p"),bs=n("The "),wo=r("a"),vs=n("MobileNetV1ForImageClassification"),ys=n(" forward method, overrides the "),gt=r("code"),ws=n("__call__"),Ns=n(" special method."),Ms=m(),v(ge.$$.fragment),$s=m(),v(ue.$$.fragment),this.h()},l(o){const d=Qn('[data-svelte="svelte-1phssyn"]',document.head);h=a(d,"META",{name:!0,content:!0}),d.forEach(t),T=p(o),_=a(o,"H1",{class:!0});var to=s(_);g=a(to,"A",{id:!0,class:!0,href:!0});var ut=s(g);b=a(ut,"SPAN",{});var _t=s(b);y(c.$$.fragment,_t),_t.forEach(t),ut.forEach(t),u=p(to),k=a(to,"SPAN",{});var bt=s(k);lr=i(bt,"MobileNet V1"),bt.forEach(t),to.forEach(t),yt=p(o),S=a(o,"H2",{class:!0});var ro=s(S);oe=a(ro,"A",{id:!0,class:!0,href:!0});var Vs=s(oe);Po=a(Vs,"SPAN",{});var xs=s(Po);y(Me.$$.fragment,xs),xs.forEach(t),Vs.forEach(t),cr=p(ro),zo=a(ro,"SPAN",{});var Ps=s(zo);dr=i(Ps,"Overview"),Ps.forEach(t),ro.forEach(t),wt=p(o),te=a(o,"P",{});var Ht=s(te);mr=i(Ht,"The MobileNet model was proposed in "),$e=a(Ht,"A",{href:!0,rel:!0});var zs=s($e);pr=i(zs,"MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications"),zs.forEach(t),fr=i(Ht," by Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam."),Ht.forEach(t),Nt=p(o),so=a(o,"P",{});var Cs=s(so);hr=i(Cs,"The abstract from the paper is the following:"),Cs.forEach(t),Mt=p(o),no=a(o,"P",{});var Fs=s(no);Co=a(Fs,"EM",{});var ks=s(Co);gr=i(ks,"We present a class of efficient models called MobileNets for mobile and embedded vision applications. MobileNets are based on a streamlined architecture that uses depth-wise separable convolutions to build light weight deep neural networks. We introduce two simple global hyper-parameters that efficiently trade off between latency and accuracy. These hyper-parameters allow the model builder to choose the right sized model for their application based on the constraints of the problem. We present extensive experiments on resource and accuracy tradeoffs and show strong performance compared to other popular models on ImageNet classification. We then demonstrate the effectiveness of MobileNets across a wide range of applications and use cases including object detection, finegrain classification, face attributes and large scale geo-localization."),ks.forEach(t),Fs.forEach(t),$t=p(o),io=a(o,"P",{});var As=s(io);ur=i(As,"Tips:"),As.forEach(t),Tt=p(o),I=a(o,"UL",{});var R=s(I);Fo=a(R,"LI",{});var js=s(Fo);E=a(js,"P",{});var q=s(E);_r=i(q,"The checkpoints are named "),re=a(q,"STRONG",{});var vt=s(re);br=i(vt,"mobilenet_v1_"),ko=a(vt,"EM",{});var Ls=s(ko);vr=i(Ls,"depth"),Ls.forEach(t),yr=i(vt,"_"),Ao=a(vt,"EM",{});var Ds=s(Ao);wr=i(Ds,"size"),Ds.forEach(t),vt.forEach(t),Nr=i(q,", for example "),jo=a(q,"STRONG",{});var Rs=s(jo);Mr=i(Rs,"mobilenet_v1_1.0_224"),Rs.forEach(t),$r=i(q,", where "),Lo=a(q,"STRONG",{});var qs=s(Lo);Tr=i(qs,"1.0"),qs.forEach(t),Ir=i(q," is the depth multiplier (sometimes also referred to as \u201Calpha\u201D or the width multiplier) and "),Do=a(q,"STRONG",{});var Ss=s(Do);Er=i(Ss,"224"),Ss.forEach(t),Vr=i(q," is the resolution of the input images the model was trained on."),q.forEach(t),js.forEach(t),xr=p(R),Ro=a(R,"LI",{});var Os=s(Ro);qo=a(Os,"P",{});var Ws=s(qo);Pr=i(Ws,"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."),Ws.forEach(t),Os.forEach(t),zr=p(R),So=a(R,"LI",{});var Us=s(So);Te=a(Us,"P",{});var Bt=s(Te);Cr=i(Bt,"One can use "),lo=a(Bt,"A",{href:!0});var Hs=s(lo);Fr=i(Hs,"MobileNetV1ImageProcessor"),Hs.forEach(t),kr=i(Bt," to prepare images for the model."),Bt.forEach(t),Us.forEach(t),Ar=p(R),Oo=a(R,"LI",{});var Bs=s(Oo);Ie=a(Bs,"P",{});var Gt=s(Ie);jr=i(Gt,"The available image classification checkpoints are pre-trained on "),Ee=a(Gt,"A",{href:!0,rel:!0});var Gs=s(Ee);Lr=i(Gs,"ImageNet-1k"),Gs.forEach(t),Dr=i(Gt," (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 \u201Cbackground\u201D class (index 0)."),Gt.forEach(t),Bs.forEach(t),Rr=p(R),Wo=a(R,"LI",{});var Ys=s(Wo);O=a(Ys,"P",{});var No=s(O);qr=i(No,"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 "),co=a(No,"A",{href:!0});var Js=s(co);Sr=i(Js,"MobileNetV1Config"),Js.forEach(t),Or=i(No," with "),Uo=a(No,"CODE",{});var Ks=s(Uo);Wr=i(Ks,"tf_padding = False"),Ks.forEach(t),Ur=i(No,"."),No.forEach(t),Ys.forEach(t),R.forEach(t),It=p(o),mo=a(o,"P",{});var Qs=s(mo);Hr=i(Qs,"Unsupported features:"),Qs.forEach(t),Et=p(o),z=a(o,"UL",{});var _e=s(z);Ho=a(_e,"LI",{});var Xs=s(Ho);Ve=a(Xs,"P",{});var Yt=s(Ve);Br=i(Yt,"The "),po=a(Yt,"A",{href:!0});var Zs=s(po);Gr=i(Zs,"MobileNetV1Model"),Zs.forEach(t),Yr=i(Yt," outputs a globally pooled version of the last hidden state. In the original model it is possible to use a 7x7 average pooling layer with stride 2 instead of global pooling. For larger inputs, this gives a pooled output that is larger than 1x1 pixel. The HuggingFace implementation does not support this."),Yt.forEach(t),Xs.forEach(t),Jr=p(_e),Bo=a(_e,"LI",{});var en=s(Bo);xe=a(en,"P",{});var Jt=s(xe);Kr=i(Jt,"It is currently not possible to specify an "),Go=a(Jt,"CODE",{});var on=s(Go);Qr=i(on,"output_stride"),on.forEach(t),Xr=i(Jt,". For smaller output strides, the original model invokes dilated convolution to prevent the spatial resolution from being reduced further. The output stride of the HuggingFace model is always 32."),Jt.forEach(t),en.forEach(t),Zr=p(_e),Yo=a(_e,"LI",{});var tn=s(Yo);Jo=a(tn,"P",{});var rn=s(Jo);ea=i(rn,"The original TensorFlow checkpoints include quantized models. We do not support these models as they include additional \u201CFakeQuantization\u201D operations to unquantize the weights."),rn.forEach(t),tn.forEach(t),oa=p(_e),Ko=a(_e,"LI",{});var an=s(Ko);Pe=a(an,"P",{});var Kt=s(Pe);ta=i(Kt,"It\u2019s common to extract the output from the pointwise layers at indices 5, 11, 12, 13 for downstream purposes. Using "),Qo=a(Kt,"CODE",{});var sn=s(Qo);ra=i(sn,"output_hidden_states=True"),sn.forEach(t),aa=i(Kt," returns the output from all intermediate layers. There is currently no way to limit this to specific layers."),Kt.forEach(t),an.forEach(t),_e.forEach(t),Vt=p(o),L=a(o,"P",{});var Mo=s(L);sa=i(Mo,"This model was contributed by "),ze=a(Mo,"A",{href:!0,rel:!0});var nn=s(ze);na=i(nn,"matthijs"),nn.forEach(t),ia=i(Mo,". The original code and weights can be found "),Ce=a(Mo,"A",{href:!0,rel:!0});var ln=s(Ce);la=i(ln,"here"),ln.forEach(t),ca=i(Mo,"."),Mo.forEach(t),xt=p(o),W=a(o,"H2",{class:!0});var Qt=s(W);ae=a(Qt,"A",{id:!0,class:!0,href:!0});var cn=s(ae);Xo=a(cn,"SPAN",{});var dn=s(Xo);y(Fe.$$.fragment,dn),dn.forEach(t),cn.forEach(t),da=p(Qt),Zo=a(Qt,"SPAN",{});var mn=s(Zo);ma=i(mn,"Resources"),mn.forEach(t),Qt.forEach(t),Pt=p(o),fo=a(o,"P",{});var pn=s(fo);pa=i(pn,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with MobileNetV1."),pn.forEach(t),zt=p(o),y(ke.$$.fragment,o),Ct=p(o),ho=a(o,"UL",{});var fn=s(ho);D=a(fn,"LI",{});var ao=s(D);go=a(ao,"A",{href:!0});var hn=s(go);fa=i(hn,"MobileNetV1ForImageClassification"),hn.forEach(t),ha=i(ao," is supported by this "),Ae=a(ao,"A",{href:!0,rel:!0});var gn=s(Ae);ga=i(gn,"example script"),gn.forEach(t),ua=i(ao," and "),je=a(ao,"A",{href:!0,rel:!0});var un=s(je);_a=i(un,"notebook"),un.forEach(t),ba=i(ao,"."),ao.forEach(t),fn.forEach(t),Ft=p(o),uo=a(o,"P",{});var _n=s(uo);va=i(_n,"If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),_n.forEach(t),kt=p(o),U=a(o,"H2",{class:!0});var Xt=s(U);se=a(Xt,"A",{id:!0,class:!0,href:!0});var bn=s(se);et=a(bn,"SPAN",{});var vn=s(et);y(Le.$$.fragment,vn),vn.forEach(t),bn.forEach(t),ya=p(Xt),ot=a(Xt,"SPAN",{});var yn=s(ot);wa=i(yn,"MobileNetV1Config"),yn.forEach(t),Xt.forEach(t),At=p(o),V=a(o,"DIV",{class:!0});var be=s(V);y(De.$$.fragment,be),Na=p(be),H=a(be,"P",{});var $o=s(H);Ma=i($o,"This is the configuration class to store the configuration of a "),_o=a($o,"A",{href:!0});var wn=s(_o);$a=i(wn,"MobileNetV1Model"),wn.forEach(t),Ta=i($o,`. It is used to instantiate a
MobileNetV1 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 MobileNetV1
`),Re=a($o,"A",{href:!0,rel:!0});var Nn=s(Re);Ia=i(Nn,"google/mobilenet_v1_1.0_224"),Nn.forEach(t),Ea=i($o," architecture."),$o.forEach(t),Va=p(be),B=a(be,"P",{});var To=s(B);xa=i(To,"Configuration objects inherit from "),bo=a(To,"A",{href:!0});var Mn=s(bo);Pa=i(Mn,"PretrainedConfig"),Mn.forEach(t),za=i(To,` and can be used to control the model outputs. Read the
documentation from `),vo=a(To,"A",{href:!0});var $n=s(vo);Ca=i($n,"PretrainedConfig"),$n.forEach(t),Fa=i(To," for more information."),To.forEach(t),ka=p(be),y(ne.$$.fragment,be),be.forEach(t),jt=p(o),G=a(o,"H2",{class:!0});var Zt=s(G);ie=a(Zt,"A",{id:!0,class:!0,href:!0});var Tn=s(ie);tt=a(Tn,"SPAN",{});var In=s(tt);y(qe.$$.fragment,In),In.forEach(t),Tn.forEach(t),Aa=p(Zt),rt=a(Zt,"SPAN",{});var En=s(rt);ja=i(En,"MobileNetV1FeatureExtractor"),En.forEach(t),Zt.forEach(t),Lt=p(o),Y=a(o,"DIV",{class:!0});var er=s(Y);y(Se.$$.fragment,er),La=p(er),le=a(er,"DIV",{class:!0});var or=s(le);y(Oe.$$.fragment,or),Da=p(or),at=a(or,"P",{});var Vn=s(at);Ra=i(Vn,"Preprocess an image or batch of images."),Vn.forEach(t),or.forEach(t),er.forEach(t),Dt=p(o),J=a(o,"H2",{class:!0});var tr=s(J);ce=a(tr,"A",{id:!0,class:!0,href:!0});var xn=s(ce);st=a(xn,"SPAN",{});var Pn=s(st);y(We.$$.fragment,Pn),Pn.forEach(t),xn.forEach(t),qa=p(tr),nt=a(tr,"SPAN",{});var zn=s(nt);Sa=i(zn,"MobileNetV1ImageProcessor"),zn.forEach(t),tr.forEach(t),Rt=p(o),A=a(o,"DIV",{class:!0});var Io=s(A);y(Ue.$$.fragment,Io),Oa=p(Io),it=a(Io,"P",{});var Cn=s(it);Wa=i(Cn,"Constructs a MobileNetV1 image processor."),Cn.forEach(t),Ua=p(Io),de=a(Io,"DIV",{class:!0});var rr=s(de);y(He.$$.fragment,rr),Ha=p(rr),lt=a(rr,"P",{});var Fn=s(lt);Ba=i(Fn,"Preprocess an image or batch of images."),Fn.forEach(t),rr.forEach(t),Io.forEach(t),qt=p(o),K=a(o,"H2",{class:!0});var ar=s(K);me=a(ar,"A",{id:!0,class:!0,href:!0});var kn=s(me);ct=a(kn,"SPAN",{});var An=s(ct);y(Be.$$.fragment,An),An.forEach(t),kn.forEach(t),Ga=p(ar),dt=a(ar,"SPAN",{});var jn=s(dt);Ya=i(jn,"MobileNetV1Model"),jn.forEach(t),ar.forEach(t),St=p(o),j=a(o,"DIV",{class:!0});var Eo=s(j);y(Ge.$$.fragment,Eo),Ja=p(Eo),Ye=a(Eo,"P",{});var sr=s(Ye);Ka=i(sr,`The bare MobileNetV1 model outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Je=a(sr,"A",{href:!0,rel:!0});var Ln=s(Je);Qa=i(Ln,"torch.nn.Module"),Ln.forEach(t),Xa=i(sr,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),sr.forEach(t),Za=p(Eo),C=a(Eo,"DIV",{class:!0});var ve=s(C);y(Ke.$$.fragment,ve),es=p(ve),Q=a(ve,"P",{});var Vo=s(Q);os=i(Vo,"The "),yo=a(Vo,"A",{href:!0});var Dn=s(yo);ts=i(Dn,"MobileNetV1Model"),Dn.forEach(t),rs=i(Vo," forward method, overrides the "),mt=a(Vo,"CODE",{});var Rn=s(mt);as=i(Rn,"__call__"),Rn.forEach(t),ss=i(Vo," special method."),Vo.forEach(t),ns=p(ve),y(pe.$$.fragment,ve),is=p(ve),y(fe.$$.fragment,ve),ve.forEach(t),Eo.forEach(t),Ot=p(o),X=a(o,"H2",{class:!0});var nr=s(X);he=a(nr,"A",{id:!0,class:!0,href:!0});var qn=s(he);pt=a(qn,"SPAN",{});var Sn=s(pt);y(Qe.$$.fragment,Sn),Sn.forEach(t),qn.forEach(t),ls=p(nr),ft=a(nr,"SPAN",{});var On=s(ft);cs=i(On,"MobileNetV1ForImageClassification"),On.forEach(t),nr.forEach(t),Wt=p(o),x=a(o,"DIV",{class:!0});var ye=s(x);y(Xe.$$.fragment,ye),ds=p(ye),ht=a(ye,"P",{});var Wn=s(ht);ms=i(Wn,`MobileNetV1 model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Wn.forEach(t),ps=p(ye),Ze=a(ye,"P",{});var ir=s(Ze);fs=i(ir,"This model is a PyTorch "),eo=a(ir,"A",{href:!0,rel:!0});var Un=s(eo);hs=i(Un,"torch.nn.Module"),Un.forEach(t),gs=i(ir,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ir.forEach(t),us=p(ye),F=a(ye,"DIV",{class:!0});var we=s(F);y(oo.$$.fragment,we),_s=p(we),Z=a(we,"P",{});var xo=s(Z);bs=i(xo,"The "),wo=a(xo,"A",{href:!0});var Hn=s(wo);vs=i(Hn,"MobileNetV1ForImageClassification"),Hn.forEach(t),ys=i(xo," forward method, overrides the "),gt=a(xo,"CODE",{});var Bn=s(gt);ws=i(Bn,"__call__"),Bn.forEach(t),Ns=i(xo," special method."),xo.forEach(t),Ms=p(we),y(ge.$$.fragment,we),$s=p(we),y(ue.$$.fragment,we),we.forEach(t),ye.forEach(t),this.h()},h(){l(h,"name","hf:doc:metadata"),l(h,"content",JSON.stringify(ni)),l(g,"id","mobilenet-v1"),l(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"),l(g,"href","#mobilenet-v1"),l(_,"class","relative group"),l(oe,"id","overview"),l(oe,"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"),l(oe,"href","#overview"),l(S,"class","relative group"),l($e,"href","https://arxiv.org/abs/1704.04861"),l($e,"rel","nofollow"),l(lo,"href","/docs/transformers/main/en/model_doc/mobilenet_v1#transformers.MobileNetV1ImageProcessor"),l(Ee,"href","https://huggingface.co/datasets/imagenet-1k"),l(Ee,"rel","nofollow"),l(co,"href","/docs/transformers/main/en/model_doc/mobilenet_v1#transformers.MobileNetV1Config"),l(po,"href","/docs/transformers/main/en/model_doc/mobilenet_v1#transformers.MobileNetV1Model"),l(ze,"href","https://huggingface.co/Matthijs"),l(ze,"rel","nofollow"),l(Ce,"href","https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md"),l(Ce,"rel","nofollow"),l(ae,"id","resources"),l(ae,"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"),l(ae,"href","#resources"),l(W,"class","relative group"),l(go,"href","/docs/transformers/main/en/model_doc/mobilenet_v1#transformers.MobileNetV1ForImageClassification"),l(Ae,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification"),l(Ae,"rel","nofollow"),l(je,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb"),l(je,"rel","nofollow"),l(se,"id","transformers.MobileNetV1Config"),l(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"),l(se,"href","#transformers.MobileNetV1Config"),l(U,"class","relative group"),l(_o,"href","/docs/transformers/main/en/model_doc/mobilenet_v1#transformers.MobileNetV1Model"),l(Re,"href","https://huggingface.co/google/mobilenet_v1_1.0_224"),l(Re,"rel","nofollow"),l(bo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),l(vo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),l(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ie,"id","transformers.MobileNetV1FeatureExtractor"),l(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"),l(ie,"href","#transformers.MobileNetV1FeatureExtractor"),l(G,"class","relative group"),l(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ce,"id","transformers.MobileNetV1ImageProcessor"),l(ce,"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"),l(ce,"href","#transformers.MobileNetV1ImageProcessor"),l(J,"class","relative group"),l(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(me,"id","transformers.MobileNetV1Model"),l(me,"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"),l(me,"href","#transformers.MobileNetV1Model"),l(K,"class","relative group"),l(Je,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Je,"rel","nofollow"),l(yo,"href","/docs/transformers/main/en/model_doc/mobilenet_v1#transformers.MobileNetV1Model"),l(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(he,"id","transformers.MobileNetV1ForImageClassification"),l(he,"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"),l(he,"href","#transformers.MobileNetV1ForImageClassification"),l(X,"class","relative group"),l(eo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(eo,"rel","nofollow"),l(wo,"href","/docs/transformers/main/en/model_doc/mobilenet_v1#transformers.MobileNetV1ForImageClassification"),l(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(x,"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,d){e(document.head,h),f(o,T,d),f(o,_,d),e(_,g),e(g,b),w(c,b,null),e(_,u),e(_,k),e(k,lr),f(o,yt,d),f(o,S,d),e(S,oe),e(oe,Po),w(Me,Po,null),e(S,cr),e(S,zo),e(zo,dr),f(o,wt,d),f(o,te,d),e(te,mr),e(te,$e),e($e,pr),e(te,fr),f(o,Nt,d),f(o,so,d),e(so,hr),f(o,Mt,d),f(o,no,d),e(no,Co),e(Co,gr),f(o,$t,d),f(o,io,d),e(io,ur),f(o,Tt,d),f(o,I,d),e(I,Fo),e(Fo,E),e(E,_r),e(E,re),e(re,br),e(re,ko),e(ko,vr),e(re,yr),e(re,Ao),e(Ao,wr),e(E,Nr),e(E,jo),e(jo,Mr),e(E,$r),e(E,Lo),e(Lo,Tr),e(E,Ir),e(E,Do),e(Do,Er),e(E,Vr),e(I,xr),e(I,Ro),e(Ro,qo),e(qo,Pr),e(I,zr),e(I,So),e(So,Te),e(Te,Cr),e(Te,lo),e(lo,Fr),e(Te,kr),e(I,Ar),e(I,Oo),e(Oo,Ie),e(Ie,jr),e(Ie,Ee),e(Ee,Lr),e(Ie,Dr),e(I,Rr),e(I,Wo),e(Wo,O),e(O,qr),e(O,co),e(co,Sr),e(O,Or),e(O,Uo),e(Uo,Wr),e(O,Ur),f(o,It,d),f(o,mo,d),e(mo,Hr),f(o,Et,d),f(o,z,d),e(z,Ho),e(Ho,Ve),e(Ve,Br),e(Ve,po),e(po,Gr),e(Ve,Yr),e(z,Jr),e(z,Bo),e(Bo,xe),e(xe,Kr),e(xe,Go),e(Go,Qr),e(xe,Xr),e(z,Zr),e(z,Yo),e(Yo,Jo),e(Jo,ea),e(z,oa),e(z,Ko),e(Ko,Pe),e(Pe,ta),e(Pe,Qo),e(Qo,ra),e(Pe,aa),f(o,Vt,d),f(o,L,d),e(L,sa),e(L,ze),e(ze,na),e(L,ia),e(L,Ce),e(Ce,la),e(L,ca),f(o,xt,d),f(o,W,d),e(W,ae),e(ae,Xo),w(Fe,Xo,null),e(W,da),e(W,Zo),e(Zo,ma),f(o,Pt,d),f(o,fo,d),e(fo,pa),f(o,zt,d),w(ke,o,d),f(o,Ct,d),f(o,ho,d),e(ho,D),e(D,go),e(go,fa),e(D,ha),e(D,Ae),e(Ae,ga),e(D,ua),e(D,je),e(je,_a),e(D,ba),f(o,Ft,d),f(o,uo,d),e(uo,va),f(o,kt,d),f(o,U,d),e(U,se),e(se,et),w(Le,et,null),e(U,ya),e(U,ot),e(ot,wa),f(o,At,d),f(o,V,d),w(De,V,null),e(V,Na),e(V,H),e(H,Ma),e(H,_o),e(_o,$a),e(H,Ta),e(H,Re),e(Re,Ia),e(H,Ea),e(V,Va),e(V,B),e(B,xa),e(B,bo),e(bo,Pa),e(B,za),e(B,vo),e(vo,Ca),e(B,Fa),e(V,ka),w(ne,V,null),f(o,jt,d),f(o,G,d),e(G,ie),e(ie,tt),w(qe,tt,null),e(G,Aa),e(G,rt),e(rt,ja),f(o,Lt,d),f(o,Y,d),w(Se,Y,null),e(Y,La),e(Y,le),w(Oe,le,null),e(le,Da),e(le,at),e(at,Ra),f(o,Dt,d),f(o,J,d),e(J,ce),e(ce,st),w(We,st,null),e(J,qa),e(J,nt),e(nt,Sa),f(o,Rt,d),f(o,A,d),w(Ue,A,null),e(A,Oa),e(A,it),e(it,Wa),e(A,Ua),e(A,de),w(He,de,null),e(de,Ha),e(de,lt),e(lt,Ba),f(o,qt,d),f(o,K,d),e(K,me),e(me,ct),w(Be,ct,null),e(K,Ga),e(K,dt),e(dt,Ya),f(o,St,d),f(o,j,d),w(Ge,j,null),e(j,Ja),e(j,Ye),e(Ye,Ka),e(Ye,Je),e(Je,Qa),e(Ye,Xa),e(j,Za),e(j,C),w(Ke,C,null),e(C,es),e(C,Q),e(Q,os),e(Q,yo),e(yo,ts),e(Q,rs),e(Q,mt),e(mt,as),e(Q,ss),e(C,ns),w(pe,C,null),e(C,is),w(fe,C,null),f(o,Ot,d),f(o,X,d),e(X,he),e(he,pt),w(Qe,pt,null),e(X,ls),e(X,ft),e(ft,cs),f(o,Wt,d),f(o,x,d),w(Xe,x,null),e(x,ds),e(x,ht),e(ht,ms),e(x,ps),e(x,Ze),e(Ze,fs),e(Ze,eo),e(eo,hs),e(Ze,gs),e(x,us),e(x,F),w(oo,F,null),e(F,_s),e(F,Z),e(Z,bs),e(Z,wo),e(wo,vs),e(Z,ys),e(Z,gt),e(gt,ws),e(Z,Ns),e(F,Ms),w(ge,F,null),e(F,$s),w(ue,F,null),Ut=!0},p(o,[d]){const to={};d&2&&(to.$$scope={dirty:d,ctx:o}),ne.$set(to);const ut={};d&2&&(ut.$$scope={dirty:d,ctx:o}),pe.$set(ut);const _t={};d&2&&(_t.$$scope={dirty:d,ctx:o}),fe.$set(_t);const bt={};d&2&&(bt.$$scope={dirty:d,ctx:o}),ge.$set(bt);const ro={};d&2&&(ro.$$scope={dirty:d,ctx:o}),ue.$set(ro)},i(o){Ut||(N(c.$$.fragment,o),N(Me.$$.fragment,o),N(Fe.$$.fragment,o),N(ke.$$.fragment,o),N(Le.$$.fragment,o),N(De.$$.fragment,o),N(ne.$$.fragment,o),N(qe.$$.fragment,o),N(Se.$$.fragment,o),N(Oe.$$.fragment,o),N(We.$$.fragment,o),N(Ue.$$.fragment,o),N(He.$$.fragment,o),N(Be.$$.fragment,o),N(Ge.$$.fragment,o),N(Ke.$$.fragment,o),N(pe.$$.fragment,o),N(fe.$$.fragment,o),N(Qe.$$.fragment,o),N(Xe.$$.fragment,o),N(oo.$$.fragment,o),N(ge.$$.fragment,o),N(ue.$$.fragment,o),Ut=!0)},o(o){M(c.$$.fragment,o),M(Me.$$.fragment,o),M(Fe.$$.fragment,o),M(ke.$$.fragment,o),M(Le.$$.fragment,o),M(De.$$.fragment,o),M(ne.$$.fragment,o),M(qe.$$.fragment,o),M(Se.$$.fragment,o),M(Oe.$$.fragment,o),M(We.$$.fragment,o),M(Ue.$$.fragment,o),M(He.$$.fragment,o),M(Be.$$.fragment,o),M(Ge.$$.fragment,o),M(Ke.$$.fragment,o),M(pe.$$.fragment,o),M(fe.$$.fragment,o),M(Qe.$$.fragment,o),M(Xe.$$.fragment,o),M(oo.$$.fragment,o),M(ge.$$.fragment,o),M(ue.$$.fragment,o),Ut=!1},d(o){t(h),o&&t(T),o&&t(_),$(c),o&&t(yt),o&&t(S),$(Me),o&&t(wt),o&&t(te),o&&t(Nt),o&&t(so),o&&t(Mt),o&&t(no),o&&t($t),o&&t(io),o&&t(Tt),o&&t(I),o&&t(It),o&&t(mo),o&&t(Et),o&&t(z),o&&t(Vt),o&&t(L),o&&t(xt),o&&t(W),$(Fe),o&&t(Pt),o&&t(fo),o&&t(zt),$(ke,o),o&&t(Ct),o&&t(ho),o&&t(Ft),o&&t(uo),o&&t(kt),o&&t(U),$(Le),o&&t(At),o&&t(V),$(De),$(ne),o&&t(jt),o&&t(G),$(qe),o&&t(Lt),o&&t(Y),$(Se),$(Oe),o&&t(Dt),o&&t(J),$(We),o&&t(Rt),o&&t(A),$(Ue),$(He),o&&t(qt),o&&t(K),$(Be),o&&t(St),o&&t(j),$(Ge),$(Ke),$(pe),$(fe),o&&t(Ot),o&&t(X),$(Qe),o&&t(Wt),o&&t(x),$(Xe),$(oo),$(ge),$(ue)}}}const ni={local:"mobilenet-v1",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.MobileNetV1Config",title:"MobileNetV1Config"},{local:"transformers.MobileNetV1FeatureExtractor",title:"MobileNetV1FeatureExtractor"},{local:"transformers.MobileNetV1ImageProcessor",title:"MobileNetV1ImageProcessor"},{local:"transformers.MobileNetV1Model",title:"MobileNetV1Model"},{local:"transformers.MobileNetV1ForImageClassification",title:"MobileNetV1ForImageClassification"}],title:"MobileNet V1"};function ii(P){return Xn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gi extends Yn{constructor(h){super();Jn(this,h,ii,si,Kn,{})}}export{gi as default,ni as metadata};
