import{S as hn,i as fn,s as gn,e as r,k as d,w as N,t as n,M as un,c as a,d as t,m,a as s,x as y,h as i,b as c,G as e,g as f,y as M,q as w,o as $,B as I,v as _n,L as Za}from"../../chunks/vendor-hf-doc-builder.js";import{T as pn}from"../../chunks/Tip-hf-doc-builder.js";import{D as X}from"../../chunks/Docstring-hf-doc-builder.js";import{C as es}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ke}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Xa}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function bn(x){let h,v,_,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"),v=n("Example:"),_=d(),N(g.$$.fragment)},l(l){h=a(l,"P",{});var u=s(h);v=i(u,"Example:"),u.forEach(t),_=m(l),y(g.$$.fragment,l)},m(l,u){f(l,h,u),e(h,v),f(l,_,u),M(g,l,u),b=!0},p:Za,i(l){b||(w(g.$$.fragment,l),b=!0)},o(l){$(g.$$.fragment,l),b=!1},d(l){l&&t(h),l&&t(_),I(g,l)}}}function vn(x){let h,v,_,g,b;return{c(){h=r("p"),v=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(l){h=a(l,"P",{});var u=s(h);v=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var A=s(_);g=i(A,"Module"),A.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(l,u){f(l,h,u),e(h,v),e(h,_),e(_,g),e(h,b)},d(l){l&&t(h)}}}function Nn(x){let h,v,_,g,b;return g=new es({props:{code:`from transformers import MobileNetV1ImageProcessor, MobileNetV1Model
import torch
from datasets import load_dataset

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

feature_extractor = MobileNetV1ImageProcessor.from_pretrained("google/mobilenet_v1_1.0_224")
model = MobileNetV1Model.from_pretrained("google/mobilenet_v1_1.0_224")

inputs = feature_extractor(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> MobileNetV1ImageProcessor, 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>feature_extractor = MobileNetV1ImageProcessor.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 = feature_extractor(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"),v=n("Example:"),_=d(),N(g.$$.fragment)},l(l){h=a(l,"P",{});var u=s(h);v=i(u,"Example:"),u.forEach(t),_=m(l),y(g.$$.fragment,l)},m(l,u){f(l,h,u),e(h,v),f(l,_,u),M(g,l,u),b=!0},p:Za,i(l){b||(w(g.$$.fragment,l),b=!0)},o(l){$(g.$$.fragment,l),b=!1},d(l){l&&t(h),l&&t(_),I(g,l)}}}function yn(x){let h,v,_,g,b;return{c(){h=r("p"),v=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(l){h=a(l,"P",{});var u=s(h);v=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a(u,"CODE",{});var A=s(_);g=i(A,"Module"),A.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(l,u){f(l,h,u),e(h,v),e(h,_),e(_,g),e(h,b)},d(l){l&&t(h)}}}function Mn(x){let h,v,_,g,b;return g=new es({props:{code:`from transformers import MobileNetV1ImageProcessor, MobileNetV1ForImageClassification
import torch
from datasets import load_dataset

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

feature_extractor = MobileNetV1ImageProcessor.from_pretrained("google/mobilenet_v1_1.0_224")
model = MobileNetV1ForImageClassification.from_pretrained("google/mobilenet_v1_1.0_224")

inputs = feature_extractor(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> MobileNetV1ImageProcessor, 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>feature_extractor = MobileNetV1ImageProcessor.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 = feature_extractor(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"),v=n("Example:"),_=d(),N(g.$$.fragment)},l(l){h=a(l,"P",{});var u=s(h);v=i(u,"Example:"),u.forEach(t),_=m(l),y(g.$$.fragment,l)},m(l,u){f(l,h,u),e(h,v),f(l,_,u),M(g,l,u),b=!0},p:Za,i(l){b||(w(g.$$.fragment,l),b=!0)},o(l){$(g.$$.fragment,l),b=!1},d(l){l&&t(h),l&&t(_),I(g,l)}}}function wn(x){let h,v,_,g,b,l,u,A,Wt,lt,S,Z,vo,ve,Ut,No,Ht,ct,ee,Bt,Ne,Gt,Yt,dt,Qe,Jt,mt,Xe,yo,Kt,pt,Ze,Qt,ht,T,Mo,V,Xt,oe,Zt,wo,er,or,$o,tr,rr,Io,ar,sr,To,nr,ir,Vo,lr,cr,dr,Po,zo,mr,pr,xo,ye,hr,eo,fr,gr,ur,Eo,Me,_r,we,br,vr,Nr,Co,O,yr,oo,Mr,wr,ko,$r,Ir,ft,to,Tr,gt,E,Ao,$e,Vr,ro,Pr,zr,xr,jo,Ie,Er,Do,Cr,kr,Ar,Fo,Lo,jr,Dr,Ro,Te,Fr,qo,Lr,Rr,ut,L,qr,Ve,Sr,Or,Pe,Wr,Ur,_t,W,te,So,ze,Hr,Oo,Br,bt,P,xe,Gr,U,Yr,ao,Jr,Kr,Ee,Qr,Xr,Zr,H,ea,so,oa,ta,no,ra,aa,sa,re,vt,B,ae,Wo,Ce,na,Uo,ia,Nt,j,ke,la,Ho,ca,da,se,Ae,ma,Bo,pa,yt,G,ne,Go,je,ha,Yo,fa,Mt,D,De,ga,Jo,ua,_a,ie,Fe,ba,Ko,va,wt,Y,le,Qo,Le,Na,Xo,ya,$t,F,Re,Ma,qe,wa,Se,$a,Ia,Ta,C,Oe,Va,J,Pa,io,za,xa,Zo,Ea,Ca,ka,ce,Aa,de,It,K,me,et,We,ja,ot,Da,Tt,z,Ue,Fa,tt,La,Ra,He,qa,Be,Sa,Oa,Wa,k,Ge,Ua,Q,Ha,lo,Ba,Ga,rt,Ya,Ja,Ka,pe,Qa,he,Vt;return l=new Ke({}),ve=new Ke({}),ze=new Ke({}),xe=new X({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/v4.25.1/src/transformers/models/mobilenet_v1/configuration_mobilenet_v1.py#L36"}}),re=new Xa({props:{anchor:"transformers.MobileNetV1Config.example",$$slots:{default:[bn]},$$scope:{ctx:x}}}),Ce=new Ke({}),ke=new X({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/v4.25.1/src/transformers/models/mobilenet_v1/image_processing_mobilenet_v1.py#L48"}}),Ae=new X({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[str, transformers.utils.generic.TensorType, 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/v4.25.1/src/transformers/models/mobilenet_v1/image_processing_mobilenet_v1.py#L220"}}),je=new Ke({}),De=new X({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/v4.25.1/src/transformers/models/mobilenet_v1/image_processing_mobilenet_v1.py#L48"}}),Fe=new X({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[str, transformers.utils.generic.TensorType, 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/v4.25.1/src/transformers/models/mobilenet_v1/image_processing_mobilenet_v1.py#L220"}}),Le=new Ke({}),Re=new X({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/v4.25.1/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/v4.25.1/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.25.1/src/transformers/models/mobilenet_v1/modeling_mobilenet_v1.py#L302"}}),Oe=new X({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/v4.25.1/en/model_doc/mobilenet_v1#transformers.MobileNetV1ImageProcessor">MobileNetV1ImageProcessor</a>. See
<a href="/docs/transformers/v4.25.1/en/model_doc/deit#transformers.DeiTImageProcessor.__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/v4.25.1/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.25.1/src/transformers/models/mobilenet_v1/modeling_mobilenet_v1.py#L356",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.25.1/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>
`}}),ce=new pn({props:{$$slots:{default:[vn]},$$scope:{ctx:x}}}),de=new Xa({props:{anchor:"transformers.MobileNetV1Model.forward.example",$$slots:{default:[Nn]},$$scope:{ctx:x}}}),We=new Ke({}),Ue=new X({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/v4.25.1/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/v4.25.1/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.25.1/src/transformers/models/mobilenet_v1/modeling_mobilenet_v1.py#L413"}}),Ge=new X({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/v4.25.1/en/model_doc/mobilenet_v1#transformers.MobileNetV1ImageProcessor">MobileNetV1ImageProcessor</a>. See
<a href="/docs/transformers/v4.25.1/en/model_doc/deit#transformers.DeiTImageProcessor.__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/v4.25.1/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/v4.25.1/src/transformers/models/mobilenet_v1/modeling_mobilenet_v1.py#L429",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),pe=new pn({props:{$$slots:{default:[yn]},$$scope:{ctx:x}}}),he=new Xa({props:{anchor:"transformers.MobileNetV1ForImageClassification.forward.example",$$slots:{default:[Mn]},$$scope:{ctx:x}}}),{c(){h=r("meta"),v=d(),_=r("h1"),g=r("a"),b=r("span"),N(l.$$.fragment),u=d(),A=r("span"),Wt=n("MobileNet V1"),lt=d(),S=r("h2"),Z=r("a"),vo=r("span"),N(ve.$$.fragment),Ut=d(),No=r("span"),Ht=n("Overview"),ct=d(),ee=r("p"),Bt=n("The MobileNet model was proposed in "),Ne=r("a"),Gt=n("MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications"),Yt=n(" by Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam."),dt=d(),Qe=r("p"),Jt=n("The abstract from the paper is the following:"),mt=d(),Xe=r("p"),yo=r("em"),Kt=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."),pt=d(),Ze=r("p"),Qt=n("Tips:"),ht=d(),T=r("ul"),Mo=r("li"),V=r("p"),Xt=n("The checkpoints are named "),oe=r("strong"),Zt=n("mobilenet_v1_"),wo=r("em"),er=n("depth"),or=n("_"),$o=r("em"),tr=n("size"),rr=n(", for example "),Io=r("strong"),ar=n("mobilenet_v1_1.0_224"),sr=n(", where "),To=r("strong"),nr=n("1.0"),ir=n(" is the depth multiplier (sometimes also referred to as \u201Calpha\u201D or the width multiplier) and "),Vo=r("strong"),lr=n("224"),cr=n(" is the resolution of the input images the model was trained on."),dr=d(),Po=r("li"),zo=r("p"),mr=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."),pr=d(),xo=r("li"),ye=r("p"),hr=n("One can use "),eo=r("a"),fr=n("MobileNetV1ImageProcessor"),gr=n(" to prepare images for the model."),ur=d(),Eo=r("li"),Me=r("p"),_r=n("The available image classification checkpoints are pre-trained on "),we=r("a"),br=n("ImageNet-1k"),vr=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)."),Nr=d(),Co=r("li"),O=r("p"),yr=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 "),oo=r("a"),Mr=n("MobileNetV1Config"),wr=n(" with "),ko=r("code"),$r=n("tf_padding = False"),Ir=n("."),ft=d(),to=r("p"),Tr=n("Unsupported features:"),gt=d(),E=r("ul"),Ao=r("li"),$e=r("p"),Vr=n("The "),ro=r("a"),Pr=n("MobileNetV1Model"),zr=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."),xr=d(),jo=r("li"),Ie=r("p"),Er=n("It is currently not possible to specify an "),Do=r("code"),Cr=n("output_stride"),kr=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."),Ar=d(),Fo=r("li"),Lo=r("p"),jr=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."),Dr=d(),Ro=r("li"),Te=r("p"),Fr=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"),Lr=n("output_hidden_states=True"),Rr=n(" returns the output from all intermediate layers. There is currently no way to limit this to specific layers."),ut=d(),L=r("p"),qr=n("This model was contributed by "),Ve=r("a"),Sr=n("matthijs"),Or=n(". The original code and weights can be found "),Pe=r("a"),Wr=n("here"),Ur=n("."),_t=d(),W=r("h2"),te=r("a"),So=r("span"),N(ze.$$.fragment),Hr=d(),Oo=r("span"),Br=n("MobileNetV1Config"),bt=d(),P=r("div"),N(xe.$$.fragment),Gr=d(),U=r("p"),Yr=n("This is the configuration class to store the configuration of a "),ao=r("a"),Jr=n("MobileNetV1Model"),Kr=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
`),Ee=r("a"),Qr=n("google/mobilenet_v1_1.0_224"),Xr=n(" architecture."),Zr=d(),H=r("p"),ea=n("Configuration objects inherit from "),so=r("a"),oa=n("PretrainedConfig"),ta=n(` and can be used to control the model outputs. Read the
documentation from `),no=r("a"),ra=n("PretrainedConfig"),aa=n(" for more information."),sa=d(),N(re.$$.fragment),vt=d(),B=r("h2"),ae=r("a"),Wo=r("span"),N(Ce.$$.fragment),na=d(),Uo=r("span"),ia=n("MobileNetV1FeatureExtractor"),Nt=d(),j=r("div"),N(ke.$$.fragment),la=d(),Ho=r("p"),ca=n("Constructs a MobileNetV1 image processor."),da=d(),se=r("div"),N(Ae.$$.fragment),ma=d(),Bo=r("p"),pa=n("Preprocess an image or batch of images."),yt=d(),G=r("h2"),ne=r("a"),Go=r("span"),N(je.$$.fragment),ha=d(),Yo=r("span"),fa=n("MobileNetV1ImageProcessor"),Mt=d(),D=r("div"),N(De.$$.fragment),ga=d(),Jo=r("p"),ua=n("Constructs a MobileNetV1 image processor."),_a=d(),ie=r("div"),N(Fe.$$.fragment),ba=d(),Ko=r("p"),va=n("Preprocess an image or batch of images."),wt=d(),Y=r("h2"),le=r("a"),Qo=r("span"),N(Le.$$.fragment),Na=d(),Xo=r("span"),ya=n("MobileNetV1Model"),$t=d(),F=r("div"),N(Re.$$.fragment),Ma=d(),qe=r("p"),wa=n(`The bare MobileNetV1 model outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Se=r("a"),$a=n("torch.nn.Module"),Ia=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ta=d(),C=r("div"),N(Oe.$$.fragment),Va=d(),J=r("p"),Pa=n("The "),io=r("a"),za=n("MobileNetV1Model"),xa=n(" forward method, overrides the "),Zo=r("code"),Ea=n("__call__"),Ca=n(" special method."),ka=d(),N(ce.$$.fragment),Aa=d(),N(de.$$.fragment),It=d(),K=r("h2"),me=r("a"),et=r("span"),N(We.$$.fragment),ja=d(),ot=r("span"),Da=n("MobileNetV1ForImageClassification"),Tt=d(),z=r("div"),N(Ue.$$.fragment),Fa=d(),tt=r("p"),La=n(`MobileNetV1 model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Ra=d(),He=r("p"),qa=n("This model is a PyTorch "),Be=r("a"),Sa=n("torch.nn.Module"),Oa=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Wa=d(),k=r("div"),N(Ge.$$.fragment),Ua=d(),Q=r("p"),Ha=n("The "),lo=r("a"),Ba=n("MobileNetV1ForImageClassification"),Ga=n(" forward method, overrides the "),rt=r("code"),Ya=n("__call__"),Ja=n(" special method."),Ka=d(),N(pe.$$.fragment),Qa=d(),N(he.$$.fragment),this.h()},l(o){const p=un('[data-svelte="svelte-1phssyn"]',document.head);h=a(p,"META",{name:!0,content:!0}),p.forEach(t),v=m(o),_=a(o,"H1",{class:!0});var Ye=s(_);g=a(Ye,"A",{id:!0,class:!0,href:!0});var at=s(g);b=a(at,"SPAN",{});var st=s(b);y(l.$$.fragment,st),st.forEach(t),at.forEach(t),u=m(Ye),A=a(Ye,"SPAN",{});var nt=s(A);Wt=i(nt,"MobileNet V1"),nt.forEach(t),Ye.forEach(t),lt=m(o),S=a(o,"H2",{class:!0});var Je=s(S);Z=a(Je,"A",{id:!0,class:!0,href:!0});var os=s(Z);vo=a(os,"SPAN",{});var ts=s(vo);y(ve.$$.fragment,ts),ts.forEach(t),os.forEach(t),Ut=m(Je),No=a(Je,"SPAN",{});var rs=s(No);Ht=i(rs,"Overview"),rs.forEach(t),Je.forEach(t),ct=m(o),ee=a(o,"P",{});var Pt=s(ee);Bt=i(Pt,"The MobileNet model was proposed in "),Ne=a(Pt,"A",{href:!0,rel:!0});var as=s(Ne);Gt=i(as,"MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications"),as.forEach(t),Yt=i(Pt," by Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam."),Pt.forEach(t),dt=m(o),Qe=a(o,"P",{});var ss=s(Qe);Jt=i(ss,"The abstract from the paper is the following:"),ss.forEach(t),mt=m(o),Xe=a(o,"P",{});var ns=s(Xe);yo=a(ns,"EM",{});var is=s(yo);Kt=i(is,"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."),is.forEach(t),ns.forEach(t),pt=m(o),Ze=a(o,"P",{});var ls=s(Ze);Qt=i(ls,"Tips:"),ls.forEach(t),ht=m(o),T=a(o,"UL",{});var R=s(T);Mo=a(R,"LI",{});var cs=s(Mo);V=a(cs,"P",{});var q=s(V);Xt=i(q,"The checkpoints are named "),oe=a(q,"STRONG",{});var it=s(oe);Zt=i(it,"mobilenet_v1_"),wo=a(it,"EM",{});var ds=s(wo);er=i(ds,"depth"),ds.forEach(t),or=i(it,"_"),$o=a(it,"EM",{});var ms=s($o);tr=i(ms,"size"),ms.forEach(t),it.forEach(t),rr=i(q,", for example "),Io=a(q,"STRONG",{});var ps=s(Io);ar=i(ps,"mobilenet_v1_1.0_224"),ps.forEach(t),sr=i(q,", where "),To=a(q,"STRONG",{});var hs=s(To);nr=i(hs,"1.0"),hs.forEach(t),ir=i(q," is the depth multiplier (sometimes also referred to as \u201Calpha\u201D or the width multiplier) and "),Vo=a(q,"STRONG",{});var fs=s(Vo);lr=i(fs,"224"),fs.forEach(t),cr=i(q," is the resolution of the input images the model was trained on."),q.forEach(t),cs.forEach(t),dr=m(R),Po=a(R,"LI",{});var gs=s(Po);zo=a(gs,"P",{});var us=s(zo);mr=i(us,"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."),us.forEach(t),gs.forEach(t),pr=m(R),xo=a(R,"LI",{});var _s=s(xo);ye=a(_s,"P",{});var zt=s(ye);hr=i(zt,"One can use "),eo=a(zt,"A",{href:!0});var bs=s(eo);fr=i(bs,"MobileNetV1ImageProcessor"),bs.forEach(t),gr=i(zt," to prepare images for the model."),zt.forEach(t),_s.forEach(t),ur=m(R),Eo=a(R,"LI",{});var vs=s(Eo);Me=a(vs,"P",{});var xt=s(Me);_r=i(xt,"The available image classification checkpoints are pre-trained on "),we=a(xt,"A",{href:!0,rel:!0});var Ns=s(we);br=i(Ns,"ImageNet-1k"),Ns.forEach(t),vr=i(xt," (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)."),xt.forEach(t),vs.forEach(t),Nr=m(R),Co=a(R,"LI",{});var ys=s(Co);O=a(ys,"P",{});var co=s(O);yr=i(co,"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 "),oo=a(co,"A",{href:!0});var Ms=s(oo);Mr=i(Ms,"MobileNetV1Config"),Ms.forEach(t),wr=i(co," with "),ko=a(co,"CODE",{});var ws=s(ko);$r=i(ws,"tf_padding = False"),ws.forEach(t),Ir=i(co,"."),co.forEach(t),ys.forEach(t),R.forEach(t),ft=m(o),to=a(o,"P",{});var $s=s(to);Tr=i($s,"Unsupported features:"),$s.forEach(t),gt=m(o),E=a(o,"UL",{});var fe=s(E);Ao=a(fe,"LI",{});var Is=s(Ao);$e=a(Is,"P",{});var Et=s($e);Vr=i(Et,"The "),ro=a(Et,"A",{href:!0});var Ts=s(ro);Pr=i(Ts,"MobileNetV1Model"),Ts.forEach(t),zr=i(Et," 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."),Et.forEach(t),Is.forEach(t),xr=m(fe),jo=a(fe,"LI",{});var Vs=s(jo);Ie=a(Vs,"P",{});var Ct=s(Ie);Er=i(Ct,"It is currently not possible to specify an "),Do=a(Ct,"CODE",{});var Ps=s(Do);Cr=i(Ps,"output_stride"),Ps.forEach(t),kr=i(Ct,". 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."),Ct.forEach(t),Vs.forEach(t),Ar=m(fe),Fo=a(fe,"LI",{});var zs=s(Fo);Lo=a(zs,"P",{});var xs=s(Lo);jr=i(xs,"The original TensorFlow checkpoints include quantized models. We do not support these models as they include additional \u201CFakeQuantization\u201D operations to unquantize the weights."),xs.forEach(t),zs.forEach(t),Dr=m(fe),Ro=a(fe,"LI",{});var Es=s(Ro);Te=a(Es,"P",{});var kt=s(Te);Fr=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 Cs=s(qo);Lr=i(Cs,"output_hidden_states=True"),Cs.forEach(t),Rr=i(kt," returns the output from all intermediate layers. There is currently no way to limit this to specific layers."),kt.forEach(t),Es.forEach(t),fe.forEach(t),ut=m(o),L=a(o,"P",{});var mo=s(L);qr=i(mo,"This model was contributed by "),Ve=a(mo,"A",{href:!0,rel:!0});var ks=s(Ve);Sr=i(ks,"matthijs"),ks.forEach(t),Or=i(mo,". The original code and weights can be found "),Pe=a(mo,"A",{href:!0,rel:!0});var As=s(Pe);Wr=i(As,"here"),As.forEach(t),Ur=i(mo,"."),mo.forEach(t),_t=m(o),W=a(o,"H2",{class:!0});var At=s(W);te=a(At,"A",{id:!0,class:!0,href:!0});var js=s(te);So=a(js,"SPAN",{});var Ds=s(So);y(ze.$$.fragment,Ds),Ds.forEach(t),js.forEach(t),Hr=m(At),Oo=a(At,"SPAN",{});var Fs=s(Oo);Br=i(Fs,"MobileNetV1Config"),Fs.forEach(t),At.forEach(t),bt=m(o),P=a(o,"DIV",{class:!0});var ge=s(P);y(xe.$$.fragment,ge),Gr=m(ge),U=a(ge,"P",{});var po=s(U);Yr=i(po,"This is the configuration class to store the configuration of a "),ao=a(po,"A",{href:!0});var Ls=s(ao);Jr=i(Ls,"MobileNetV1Model"),Ls.forEach(t),Kr=i(po,`. 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
`),Ee=a(po,"A",{href:!0,rel:!0});var Rs=s(Ee);Qr=i(Rs,"google/mobilenet_v1_1.0_224"),Rs.forEach(t),Xr=i(po," architecture."),po.forEach(t),Zr=m(ge),H=a(ge,"P",{});var ho=s(H);ea=i(ho,"Configuration objects inherit from "),so=a(ho,"A",{href:!0});var qs=s(so);oa=i(qs,"PretrainedConfig"),qs.forEach(t),ta=i(ho,` and can be used to control the model outputs. Read the
documentation from `),no=a(ho,"A",{href:!0});var Ss=s(no);ra=i(Ss,"PretrainedConfig"),Ss.forEach(t),aa=i(ho," for more information."),ho.forEach(t),sa=m(ge),y(re.$$.fragment,ge),ge.forEach(t),vt=m(o),B=a(o,"H2",{class:!0});var jt=s(B);ae=a(jt,"A",{id:!0,class:!0,href:!0});var Os=s(ae);Wo=a(Os,"SPAN",{});var Ws=s(Wo);y(Ce.$$.fragment,Ws),Ws.forEach(t),Os.forEach(t),na=m(jt),Uo=a(jt,"SPAN",{});var Us=s(Uo);ia=i(Us,"MobileNetV1FeatureExtractor"),Us.forEach(t),jt.forEach(t),Nt=m(o),j=a(o,"DIV",{class:!0});var fo=s(j);y(ke.$$.fragment,fo),la=m(fo),Ho=a(fo,"P",{});var Hs=s(Ho);ca=i(Hs,"Constructs a MobileNetV1 image processor."),Hs.forEach(t),da=m(fo),se=a(fo,"DIV",{class:!0});var Dt=s(se);y(Ae.$$.fragment,Dt),ma=m(Dt),Bo=a(Dt,"P",{});var Bs=s(Bo);pa=i(Bs,"Preprocess an image or batch of images."),Bs.forEach(t),Dt.forEach(t),fo.forEach(t),yt=m(o),G=a(o,"H2",{class:!0});var Ft=s(G);ne=a(Ft,"A",{id:!0,class:!0,href:!0});var Gs=s(ne);Go=a(Gs,"SPAN",{});var Ys=s(Go);y(je.$$.fragment,Ys),Ys.forEach(t),Gs.forEach(t),ha=m(Ft),Yo=a(Ft,"SPAN",{});var Js=s(Yo);fa=i(Js,"MobileNetV1ImageProcessor"),Js.forEach(t),Ft.forEach(t),Mt=m(o),D=a(o,"DIV",{class:!0});var go=s(D);y(De.$$.fragment,go),ga=m(go),Jo=a(go,"P",{});var Ks=s(Jo);ua=i(Ks,"Constructs a MobileNetV1 image processor."),Ks.forEach(t),_a=m(go),ie=a(go,"DIV",{class:!0});var Lt=s(ie);y(Fe.$$.fragment,Lt),ba=m(Lt),Ko=a(Lt,"P",{});var Qs=s(Ko);va=i(Qs,"Preprocess an image or batch of images."),Qs.forEach(t),Lt.forEach(t),go.forEach(t),wt=m(o),Y=a(o,"H2",{class:!0});var Rt=s(Y);le=a(Rt,"A",{id:!0,class:!0,href:!0});var Xs=s(le);Qo=a(Xs,"SPAN",{});var Zs=s(Qo);y(Le.$$.fragment,Zs),Zs.forEach(t),Xs.forEach(t),Na=m(Rt),Xo=a(Rt,"SPAN",{});var en=s(Xo);ya=i(en,"MobileNetV1Model"),en.forEach(t),Rt.forEach(t),$t=m(o),F=a(o,"DIV",{class:!0});var uo=s(F);y(Re.$$.fragment,uo),Ma=m(uo),qe=a(uo,"P",{});var qt=s(qe);wa=i(qt,`The bare MobileNetV1 model outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Se=a(qt,"A",{href:!0,rel:!0});var on=s(Se);$a=i(on,"torch.nn.Module"),on.forEach(t),Ia=i(qt,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),qt.forEach(t),Ta=m(uo),C=a(uo,"DIV",{class:!0});var ue=s(C);y(Oe.$$.fragment,ue),Va=m(ue),J=a(ue,"P",{});var _o=s(J);Pa=i(_o,"The "),io=a(_o,"A",{href:!0});var tn=s(io);za=i(tn,"MobileNetV1Model"),tn.forEach(t),xa=i(_o," forward method, overrides the "),Zo=a(_o,"CODE",{});var rn=s(Zo);Ea=i(rn,"__call__"),rn.forEach(t),Ca=i(_o," special method."),_o.forEach(t),ka=m(ue),y(ce.$$.fragment,ue),Aa=m(ue),y(de.$$.fragment,ue),ue.forEach(t),uo.forEach(t),It=m(o),K=a(o,"H2",{class:!0});var St=s(K);me=a(St,"A",{id:!0,class:!0,href:!0});var an=s(me);et=a(an,"SPAN",{});var sn=s(et);y(We.$$.fragment,sn),sn.forEach(t),an.forEach(t),ja=m(St),ot=a(St,"SPAN",{});var nn=s(ot);Da=i(nn,"MobileNetV1ForImageClassification"),nn.forEach(t),St.forEach(t),Tt=m(o),z=a(o,"DIV",{class:!0});var _e=s(z);y(Ue.$$.fragment,_e),Fa=m(_e),tt=a(_e,"P",{});var ln=s(tt);La=i(ln,`MobileNetV1 model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),ln.forEach(t),Ra=m(_e),He=a(_e,"P",{});var Ot=s(He);qa=i(Ot,"This model is a PyTorch "),Be=a(Ot,"A",{href:!0,rel:!0});var cn=s(Be);Sa=i(cn,"torch.nn.Module"),cn.forEach(t),Oa=i(Ot,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ot.forEach(t),Wa=m(_e),k=a(_e,"DIV",{class:!0});var be=s(k);y(Ge.$$.fragment,be),Ua=m(be),Q=a(be,"P",{});var bo=s(Q);Ha=i(bo,"The "),lo=a(bo,"A",{href:!0});var dn=s(lo);Ba=i(dn,"MobileNetV1ForImageClassification"),dn.forEach(t),Ga=i(bo," forward method, overrides the "),rt=a(bo,"CODE",{});var mn=s(rt);Ya=i(mn,"__call__"),mn.forEach(t),Ja=i(bo," special method."),bo.forEach(t),Ka=m(be),y(pe.$$.fragment,be),Qa=m(be),y(he.$$.fragment,be),be.forEach(t),_e.forEach(t),this.h()},h(){c(h,"name","hf:doc:metadata"),c(h,"content",JSON.stringify($n)),c(g,"id","mobilenet-v1"),c(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"),c(g,"href","#mobilenet-v1"),c(_,"class","relative group"),c(Z,"id","overview"),c(Z,"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"),c(Z,"href","#overview"),c(S,"class","relative group"),c(Ne,"href","https://arxiv.org/abs/1704.04861"),c(Ne,"rel","nofollow"),c(eo,"href","/docs/transformers/v4.25.1/en/model_doc/mobilenet_v1#transformers.MobileNetV1ImageProcessor"),c(we,"href","https://huggingface.co/datasets/imagenet-1k"),c(we,"rel","nofollow"),c(oo,"href","/docs/transformers/v4.25.1/en/model_doc/mobilenet_v1#transformers.MobileNetV1Config"),c(ro,"href","/docs/transformers/v4.25.1/en/model_doc/mobilenet_v1#transformers.MobileNetV1Model"),c(Ve,"href","https://huggingface.co/Matthijs"),c(Ve,"rel","nofollow"),c(Pe,"href","https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md"),c(Pe,"rel","nofollow"),c(te,"id","transformers.MobileNetV1Config"),c(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"),c(te,"href","#transformers.MobileNetV1Config"),c(W,"class","relative group"),c(ao,"href","/docs/transformers/v4.25.1/en/model_doc/mobilenet_v1#transformers.MobileNetV1Model"),c(Ee,"href","https://huggingface.co/google/mobilenet_v1_1.0_224"),c(Ee,"rel","nofollow"),c(so,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),c(no,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),c(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ae,"id","transformers.MobileNetV1ImageProcessor"),c(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"),c(ae,"href","#transformers.MobileNetV1ImageProcessor"),c(B,"class","relative group"),c(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ne,"id","transformers.MobileNetV1ImageProcessor"),c(ne,"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"),c(ne,"href","#transformers.MobileNetV1ImageProcessor"),c(G,"class","relative group"),c(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(le,"id","transformers.MobileNetV1Model"),c(le,"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"),c(le,"href","#transformers.MobileNetV1Model"),c(Y,"class","relative group"),c(Se,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Se,"rel","nofollow"),c(io,"href","/docs/transformers/v4.25.1/en/model_doc/mobilenet_v1#transformers.MobileNetV1Model"),c(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(me,"id","transformers.MobileNetV1ForImageClassification"),c(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"),c(me,"href","#transformers.MobileNetV1ForImageClassification"),c(K,"class","relative group"),c(Be,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Be,"rel","nofollow"),c(lo,"href","/docs/transformers/v4.25.1/en/model_doc/mobilenet_v1#transformers.MobileNetV1ForImageClassification"),c(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(z,"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,p){e(document.head,h),f(o,v,p),f(o,_,p),e(_,g),e(g,b),M(l,b,null),e(_,u),e(_,A),e(A,Wt),f(o,lt,p),f(o,S,p),e(S,Z),e(Z,vo),M(ve,vo,null),e(S,Ut),e(S,No),e(No,Ht),f(o,ct,p),f(o,ee,p),e(ee,Bt),e(ee,Ne),e(Ne,Gt),e(ee,Yt),f(o,dt,p),f(o,Qe,p),e(Qe,Jt),f(o,mt,p),f(o,Xe,p),e(Xe,yo),e(yo,Kt),f(o,pt,p),f(o,Ze,p),e(Ze,Qt),f(o,ht,p),f(o,T,p),e(T,Mo),e(Mo,V),e(V,Xt),e(V,oe),e(oe,Zt),e(oe,wo),e(wo,er),e(oe,or),e(oe,$o),e($o,tr),e(V,rr),e(V,Io),e(Io,ar),e(V,sr),e(V,To),e(To,nr),e(V,ir),e(V,Vo),e(Vo,lr),e(V,cr),e(T,dr),e(T,Po),e(Po,zo),e(zo,mr),e(T,pr),e(T,xo),e(xo,ye),e(ye,hr),e(ye,eo),e(eo,fr),e(ye,gr),e(T,ur),e(T,Eo),e(Eo,Me),e(Me,_r),e(Me,we),e(we,br),e(Me,vr),e(T,Nr),e(T,Co),e(Co,O),e(O,yr),e(O,oo),e(oo,Mr),e(O,wr),e(O,ko),e(ko,$r),e(O,Ir),f(o,ft,p),f(o,to,p),e(to,Tr),f(o,gt,p),f(o,E,p),e(E,Ao),e(Ao,$e),e($e,Vr),e($e,ro),e(ro,Pr),e($e,zr),e(E,xr),e(E,jo),e(jo,Ie),e(Ie,Er),e(Ie,Do),e(Do,Cr),e(Ie,kr),e(E,Ar),e(E,Fo),e(Fo,Lo),e(Lo,jr),e(E,Dr),e(E,Ro),e(Ro,Te),e(Te,Fr),e(Te,qo),e(qo,Lr),e(Te,Rr),f(o,ut,p),f(o,L,p),e(L,qr),e(L,Ve),e(Ve,Sr),e(L,Or),e(L,Pe),e(Pe,Wr),e(L,Ur),f(o,_t,p),f(o,W,p),e(W,te),e(te,So),M(ze,So,null),e(W,Hr),e(W,Oo),e(Oo,Br),f(o,bt,p),f(o,P,p),M(xe,P,null),e(P,Gr),e(P,U),e(U,Yr),e(U,ao),e(ao,Jr),e(U,Kr),e(U,Ee),e(Ee,Qr),e(U,Xr),e(P,Zr),e(P,H),e(H,ea),e(H,so),e(so,oa),e(H,ta),e(H,no),e(no,ra),e(H,aa),e(P,sa),M(re,P,null),f(o,vt,p),f(o,B,p),e(B,ae),e(ae,Wo),M(Ce,Wo,null),e(B,na),e(B,Uo),e(Uo,ia),f(o,Nt,p),f(o,j,p),M(ke,j,null),e(j,la),e(j,Ho),e(Ho,ca),e(j,da),e(j,se),M(Ae,se,null),e(se,ma),e(se,Bo),e(Bo,pa),f(o,yt,p),f(o,G,p),e(G,ne),e(ne,Go),M(je,Go,null),e(G,ha),e(G,Yo),e(Yo,fa),f(o,Mt,p),f(o,D,p),M(De,D,null),e(D,ga),e(D,Jo),e(Jo,ua),e(D,_a),e(D,ie),M(Fe,ie,null),e(ie,ba),e(ie,Ko),e(Ko,va),f(o,wt,p),f(o,Y,p),e(Y,le),e(le,Qo),M(Le,Qo,null),e(Y,Na),e(Y,Xo),e(Xo,ya),f(o,$t,p),f(o,F,p),M(Re,F,null),e(F,Ma),e(F,qe),e(qe,wa),e(qe,Se),e(Se,$a),e(qe,Ia),e(F,Ta),e(F,C),M(Oe,C,null),e(C,Va),e(C,J),e(J,Pa),e(J,io),e(io,za),e(J,xa),e(J,Zo),e(Zo,Ea),e(J,Ca),e(C,ka),M(ce,C,null),e(C,Aa),M(de,C,null),f(o,It,p),f(o,K,p),e(K,me),e(me,et),M(We,et,null),e(K,ja),e(K,ot),e(ot,Da),f(o,Tt,p),f(o,z,p),M(Ue,z,null),e(z,Fa),e(z,tt),e(tt,La),e(z,Ra),e(z,He),e(He,qa),e(He,Be),e(Be,Sa),e(He,Oa),e(z,Wa),e(z,k),M(Ge,k,null),e(k,Ua),e(k,Q),e(Q,Ha),e(Q,lo),e(lo,Ba),e(Q,Ga),e(Q,rt),e(rt,Ya),e(Q,Ja),e(k,Ka),M(pe,k,null),e(k,Qa),M(he,k,null),Vt=!0},p(o,[p]){const Ye={};p&2&&(Ye.$$scope={dirty:p,ctx:o}),re.$set(Ye);const at={};p&2&&(at.$$scope={dirty:p,ctx:o}),ce.$set(at);const st={};p&2&&(st.$$scope={dirty:p,ctx:o}),de.$set(st);const nt={};p&2&&(nt.$$scope={dirty:p,ctx:o}),pe.$set(nt);const Je={};p&2&&(Je.$$scope={dirty:p,ctx:o}),he.$set(Je)},i(o){Vt||(w(l.$$.fragment,o),w(ve.$$.fragment,o),w(ze.$$.fragment,o),w(xe.$$.fragment,o),w(re.$$.fragment,o),w(Ce.$$.fragment,o),w(ke.$$.fragment,o),w(Ae.$$.fragment,o),w(je.$$.fragment,o),w(De.$$.fragment,o),w(Fe.$$.fragment,o),w(Le.$$.fragment,o),w(Re.$$.fragment,o),w(Oe.$$.fragment,o),w(ce.$$.fragment,o),w(de.$$.fragment,o),w(We.$$.fragment,o),w(Ue.$$.fragment,o),w(Ge.$$.fragment,o),w(pe.$$.fragment,o),w(he.$$.fragment,o),Vt=!0)},o(o){$(l.$$.fragment,o),$(ve.$$.fragment,o),$(ze.$$.fragment,o),$(xe.$$.fragment,o),$(re.$$.fragment,o),$(Ce.$$.fragment,o),$(ke.$$.fragment,o),$(Ae.$$.fragment,o),$(je.$$.fragment,o),$(De.$$.fragment,o),$(Fe.$$.fragment,o),$(Le.$$.fragment,o),$(Re.$$.fragment,o),$(Oe.$$.fragment,o),$(ce.$$.fragment,o),$(de.$$.fragment,o),$(We.$$.fragment,o),$(Ue.$$.fragment,o),$(Ge.$$.fragment,o),$(pe.$$.fragment,o),$(he.$$.fragment,o),Vt=!1},d(o){t(h),o&&t(v),o&&t(_),I(l),o&&t(lt),o&&t(S),I(ve),o&&t(ct),o&&t(ee),o&&t(dt),o&&t(Qe),o&&t(mt),o&&t(Xe),o&&t(pt),o&&t(Ze),o&&t(ht),o&&t(T),o&&t(ft),o&&t(to),o&&t(gt),o&&t(E),o&&t(ut),o&&t(L),o&&t(_t),o&&t(W),I(ze),o&&t(bt),o&&t(P),I(xe),I(re),o&&t(vt),o&&t(B),I(Ce),o&&t(Nt),o&&t(j),I(ke),I(Ae),o&&t(yt),o&&t(G),I(je),o&&t(Mt),o&&t(D),I(De),I(Fe),o&&t(wt),o&&t(Y),I(Le),o&&t($t),o&&t(F),I(Re),I(Oe),I(ce),I(de),o&&t(It),o&&t(K),I(We),o&&t(Tt),o&&t(z),I(Ue),I(Ge),I(pe),I(he)}}}const $n={local:"mobilenet-v1",sections:[{local:"overview",title:"Overview"},{local:"transformers.MobileNetV1Config",title:"MobileNetV1Config"},{local:"transformers.MobileNetV1ImageProcessor",title:"MobileNetV1FeatureExtractor"},{local:"transformers.MobileNetV1ImageProcessor",title:"MobileNetV1ImageProcessor"},{local:"transformers.MobileNetV1Model",title:"MobileNetV1Model"},{local:"transformers.MobileNetV1ForImageClassification",title:"MobileNetV1ForImageClassification"}],title:"MobileNet V1"};function In(x){return _n(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Cn extends hn{constructor(h){super();fn(this,h,In,wn,gn,{})}}export{Cn as default,$n as metadata};
