import{S as Lo,i as So,s as No,e as a,k as c,w as f,t as s,M as jo,c as o,d as r,m as d,a as n,x as h,h as i,b as l,F as e,g as y,y as g,q as _,o as v,B as x}from"../../chunks/vendor-4833417e.js";import{T as Do}from"../../chunks/Tip-fffd6df1.js";import{D as z}from"../../chunks/Docstring-4f315ed9.js";import{C as Ao}from"../../chunks/CodeBlock-6a3d1b46.js";import{I as zt}from"../../chunks/IconCopyLink-4b81c553.js";import"../../chunks/CopyButton-dacfbfaf.js";function Bo(fe){let m,F,p,E,P;return{c(){m=a("p"),F=s("Passing "),p=a("code"),E=s("use_auth_token=True"),P=s(" is required when you want to use a private model.")},l($){m=o($,"P",{});var T=n(m);F=i(T,"Passing "),p=o(T,"CODE",{});var S=n(p);E=i(S,"use_auth_token=True"),S.forEach(r),P=i(T," is required when you want to use a private model."),T.forEach(r)},m($,T){y($,m,T),e(m,F),e(m,p),e(p,E),e(m,P)},d($){$&&r(m)}}}function Co(fe){let m,F,p,E,P,$,T,S;return{c(){m=a("p"),F=s("If the "),p=a("code"),E=s("processed_features"),P=s(` passed are dictionary of numpy arrays, PyTorch tensors or TensorFlow tensors, the
result will use the same type unless you provide a different tensor type with `),$=a("code"),T=s("return_tensors"),S=s(`. In the case of
PyTorch tensors, you will lose the specific device of your tensors however.`)},l(O){m=o(O,"P",{});var q=n(m);F=i(q,"If the "),p=o(q,"CODE",{});var M=n(p);E=i(M,"processed_features"),M.forEach(r),P=i(q,` passed are dictionary of numpy arrays, PyTorch tensors or TensorFlow tensors, the
result will use the same type unless you provide a different tensor type with `),$=o(q,"CODE",{});var Be=n($);T=i(Be,"return_tensors"),Be.forEach(r),S=i(q,`. In the case of
PyTorch tensors, you will lose the specific device of your tensors however.`),q.forEach(r)},m(O,q){y(O,m,q),e(m,F),e(m,p),e(p,E),e(m,P),e(m,$),e($,T),e(m,S)},d(O){O&&r(m)}}}function Vo(fe){let m,F,p,E,P,$,T,S,O,q,M,Be,Ke,tr,rr,Qe,ar,or,Pt,W,Q,Xe,he,nr,Ze,sr,qt,D,ge,ir,et,cr,dr,k,_e,lr,j,mr,Ce,ur,pr,tt,fr,hr,Ve,gr,_r,vr,X,xr,rt,yr,Er,ve,$r,Z,xe,br,H,wr,at,Fr,Tr,Oe,kr,Ir,Mt,U,ee,ot,ye,zr,nt,Pr,Dt,A,Ee,qr,st,Mr,Dr,N,$e,Lr,it,Sr,Nr,R,jr,ct,Ar,Br,dt,Cr,Vr,Or,te,Lt,J,re,lt,be,Wr,mt,Hr,St,w,we,Ur,Y,Rr,We,Jr,Yr,ut,Gr,Kr,Qr,pt,Xr,Zr,ae,Fe,ea,ft,ta,ra,oe,Te,aa,ke,oa,ht,na,sa,Nt,G,ne,gt,Ie,ia,_t,ca,jt,b,ze,da,vt,la,ma,se,Pe,ua,qe,pa,xt,fa,ha,ga,ie,Me,_a,L,va,yt,xa,ya,Et,Ea,$a,$t,ba,wa,bt,Fa,Ta,ka,ce,De,Ia,K,za,wt,Pa,qa,Ft,Ma,Da,La,de,Le,Sa,Se,Na,Tt,ja,Aa,Ba,le,Ne,Ca,je,Va,kt,Oa,Wa,At;return $=new zt({}),he=new zt({}),ge=new z({props:{name:"class transformers.FeatureExtractionMixin",anchor:"transformers.FeatureExtractionMixin",parameters:[{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/feature_extraction_utils.py#L205"}}),_e=new z({props:{name:"from_pretrained",anchor:"transformers.FeatureExtractionMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/feature_extraction_utils.py#L229",parametersDescription:[{anchor:"transformers.FeatureExtractionMixin.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
This can be either:</p>
<ul>
<li>a string, the <em>model id</em> of a pretrained feature_extractor hosted inside a model repo on
huggingface.co. Valid model ids can be located at the root-level, like <code>bert-base-uncased</code>, or
namespaced under a user or organization name, like <code>dbmdz/bert-base-german-cased</code>.</li>
<li>a path to a <em>directory</em> containing a feature extractor file saved using the
<a href="/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> method, e.g.,
<code>./my_model_directory/</code>.</li>
<li>a path or url to a saved feature extractor JSON <em>file</em>, e.g.,
<code>./my_model_directory/preprocessor_config.json</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"transformers.FeatureExtractionMixin.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model feature extractor should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"transformers.FeatureExtractionMixin.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force to (re-)download the feature extractor files and override the cached versions
if they exist.`,name:"force_download"},{anchor:"transformers.FeatureExtractionMixin.from_pretrained.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to delete incompletely received file. Attempts to resume the download if such a file
exists.`,name:"resume_download"},{anchor:"transformers.FeatureExtractionMixin.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, e.g., <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}.</code> The proxies are used on each request.`,name:"proxies"},{anchor:"transformers.FeatureExtractionMixin.from_pretrained.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>transformers-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"transformers.FeatureExtractionMixin.from_pretrained.revision(str,",description:`<strong>revision(<code>str</code>,</strong> <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision(str,"},{anchor:"transformers.FeatureExtractionMixin.from_pretrained.return_unused_kwargs",description:`<strong>return_unused_kwargs</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>False</code>, then this function returns just the final feature extractor object. If <code>True</code>, then this
functions returns a <code>Tuple(feature_extractor, unused_kwargs)</code> where <em>unused_kwargs</em> is a dictionary
consisting of the key/value pairs whose keys are not feature extractor attributes: i.e., the part of
<code>kwargs</code> which has not been used to update <code>feature_extractor</code> and is otherwise ignored.`,name:"return_unused_kwargs"},{anchor:"transformers.FeatureExtractionMixin.from_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
The values in kwargs of any keys which are feature extractor attributes will be used to override the
loaded values. Behavior concerning key/value pairs whose keys are <em>not</em> feature extractor attributes is
controlled by the <code>return_unused_kwargs</code> keyword parameter.`,name:"kwargs"}],returnDescription:`
<p>A feature extractor of type <a
  href="/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin"
>FeatureExtractionMixin</a>.</p>
`}}),X=new Do({props:{$$slots:{default:[Bo]},$$scope:{ctx:fe}}}),ve=new Ao({props:{code:`# We can't instantiate directly the base class *FeatureExtractionMixin* nor *SequenceFeatureExtractor* so let's show the examples on a
# derived class: *Wav2Vec2FeatureExtractor*
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(
    "facebook/wav2vec2-base-960h"
)  # Download feature_extraction_config from huggingface.co and cache.
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(
    "./test/saved_model/"
)  # E.g. feature_extractor (or model) was saved using *save_pretrained('./test/saved_model/')*
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained("./test/saved_model/preprocessor_config.json")
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(
    "facebook/wav2vec2-base-960h", return_attention_mask=False, foo=False
)
assert feature_extractor.return_attention_mask is False
feature_extractor, unused_kwargs = Wav2Vec2FeatureExtractor.from_pretrained(
    "facebook/wav2vec2-base-960h", return_attention_mask=False, foo=False, return_unused_kwargs=True
)
assert feature_extractor.return_attention_mask is False
assert unused_kwargs == {"foo": False}`,highlighted:`<span class="hljs-comment"># We can&#x27;t instantiate directly the base class *FeatureExtractionMixin* nor *SequenceFeatureExtractor* so let&#x27;s show the examples on a</span>
<span class="hljs-comment"># derived class: *Wav2Vec2FeatureExtractor*</span>
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(
    <span class="hljs-string">&quot;facebook/wav2vec2-base-960h&quot;</span>
)  <span class="hljs-comment"># Download feature_extraction_config from huggingface.co and cache.</span>
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(
    <span class="hljs-string">&quot;./test/saved_model/&quot;</span>
)  <span class="hljs-comment"># E.g. feature_extractor (or model) was saved using *save_pretrained(&#x27;./test/saved_model/&#x27;)*</span>
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(<span class="hljs-string">&quot;./test/saved_model/preprocessor_config.json&quot;</span>)
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(
    <span class="hljs-string">&quot;facebook/wav2vec2-base-960h&quot;</span>, return_attention_mask=<span class="hljs-literal">False</span>, foo=<span class="hljs-literal">False</span>
)
<span class="hljs-keyword">assert</span> feature_extractor.return_attention_mask <span class="hljs-keyword">is</span> <span class="hljs-literal">False</span>
feature_extractor, unused_kwargs = Wav2Vec2FeatureExtractor.from_pretrained(
    <span class="hljs-string">&quot;facebook/wav2vec2-base-960h&quot;</span>, return_attention_mask=<span class="hljs-literal">False</span>, foo=<span class="hljs-literal">False</span>, return_unused_kwargs=<span class="hljs-literal">True</span>
)
<span class="hljs-keyword">assert</span> feature_extractor.return_attention_mask <span class="hljs-keyword">is</span> <span class="hljs-literal">False</span>
<span class="hljs-keyword">assert</span> unused_kwargs == {<span class="hljs-string">&quot;foo&quot;</span>: <span class="hljs-literal">False</span>}`}}),xe=new z({props:{name:"save_pretrained",anchor:"transformers.FeatureExtractionMixin.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/feature_extraction_utils.py#L313",parametersDescription:[{anchor:"transformers.FeatureExtractionMixin.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory where the feature extractor JSON file will be saved (will be created if it does not exist).`,name:"save_directory"},{anchor:"transformers.FeatureExtractionMixin.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your feature extractor to the Hugging Face model hub after saving it.</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>Using <code>push_to_hub=True</code> will synchronize the repository you are pushing to with <code>save_directory</code>,
which requires <code>save_directory</code> to be a local clone of the repo you are pushing to if it&#x2019;s an existing
folder. Pass along <code>temp_dir=True</code> to use a temporary directory instead.</p>

					</div>
<p>kwargs &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/pr_15839/en/main_classes/model#transformers.file_utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"push_to_hub"}]}}),ye=new zt({}),Ee=new z({props:{name:"class transformers.SequenceFeatureExtractor",anchor:"transformers.SequenceFeatureExtractor",parameters:[{name:"feature_size",val:": int"},{name:"sampling_rate",val:": int"},{name:"padding_value",val:": float"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/feature_extraction_sequence_utils.py#L38",parametersDescription:[{anchor:"transformers.SequenceFeatureExtractor.feature_size",description:`<strong>feature_size</strong> (<code>int</code>) &#x2014;
The feature dimension of the extracted features.`,name:"feature_size"},{anchor:"transformers.SequenceFeatureExtractor.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>) &#x2014;
The sampling rate at which the audio files should be digitalized expressed in Hertz per second (Hz).`,name:"sampling_rate"},{anchor:"transformers.SequenceFeatureExtractor.padding_value",description:`<strong>padding_value</strong> (<code>float</code>) &#x2014;
The value that is used to fill the padding values / vectors.`,name:"padding_value"}]}}),$e=new z({props:{name:"pad",anchor:"transformers.SequenceFeatureExtractor.pad",parameters:[{name:"processed_features",val:": typing.Union[transformers.feature_extraction_utils.BatchFeature, typing.List[transformers.feature_extraction_utils.BatchFeature], typing.Dict[str, transformers.feature_extraction_utils.BatchFeature], typing.Dict[str, typing.List[transformers.feature_extraction_utils.BatchFeature]], typing.List[typing.Dict[str, transformers.feature_extraction_utils.BatchFeature]]]"},{name:"padding",val:": typing.Union[bool, str, transformers.file_utils.PaddingStrategy] = True"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"truncation",val:": bool = False"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.file_utils.TensorType, NoneType] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/feature_extraction_sequence_utils.py#L61",parametersDescription:[{anchor:"transformers.SequenceFeatureExtractor.pad.processed_features",description:`<strong>processed_features</strong> (<a href="/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.BatchFeature">BatchFeature</a>, list of <a href="/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.BatchFeature">BatchFeature</a>, <code>Dict[str, List[float]]</code>, <code>Dict[str, List[List[float]]</code> or <code>List[Dict[str, List[float]]]</code>) &#x2014;
Processed inputs. Can represent one input (<a href="/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.BatchFeature">BatchFeature</a> or <code>Dict[str, List[float]]</code>) or a batch of
input values / vectors (list of <a href="/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.BatchFeature">BatchFeature</a>, <em>Dict[str, List[List[float]]]</em> or <em>List[Dict[str,
List[float]]]</em>) so you can use this method during preprocessing as well as in a PyTorch Dataloader
collate function.</p>
<p>Instead of <code>List[float]</code> you can have tensors (numpy arrays, PyTorch tensors or TensorFlow tensors),
see the note above for the return type.`,name:"processed_features"},{anchor:"transformers.SequenceFeatureExtractor.pad.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/pr_15839/en/internal/file_utils#transformers.file_utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Select a strategy to pad the returned sequences (according to the model&#x2019;s padding side and padding
index) among:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.SequenceFeatureExtractor.pad.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Maximum length of the returned list and optionally padding length (see above).`,name:"max_length"},{anchor:"transformers.SequenceFeatureExtractor.pad.truncation",description:`<strong>truncation</strong> (<code>bool</code>) &#x2014;
Activates truncation to cut input sequences longer than <code>max_length</code> to <code>max_length</code>.`,name:"truncation"},{anchor:"transformers.SequenceFeatureExtractor.pad.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value.</p>
<p>This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability</p>
<blockquote>
<p>= 7.5 (Volta), or on TPUs which benefit from having sequence lengths be a multiple of 128.</p>
</blockquote>`,name:"pad_to_multiple_of"},{anchor:"transformers.SequenceFeatureExtractor.pad.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return the attention mask. If left to the default, will return the attention mask according
to the specific feature_extractor&#x2019;s default.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"return_attention_mask"},{anchor:"transformers.SequenceFeatureExtractor.pad.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/pr_15839/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"}]}}),te=new Do({props:{$$slots:{default:[Co]},$$scope:{ctx:fe}}}),be=new zt({}),we=new z({props:{name:"class transformers.BatchFeature",anchor:"transformers.BatchFeature",parameters:[{name:"data",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"tensor_type",val:": typing.Union[NoneType, str, transformers.file_utils.TensorType] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/feature_extraction_utils.py#L63",parametersDescription:[{anchor:"transformers.BatchFeature.data",description:`<strong>data</strong> (<code>dict</code>) &#x2014;
Dictionary of lists/arrays/tensors returned by the <strong>call</strong>/pad methods (&#x2018;input_values&#x2019;, &#x2018;attention_mask&#x2019;,
etc.).`,name:"data"},{anchor:"transformers.BatchFeature.tensor_type",description:`<strong>tensor_type</strong> (<code>Union[None, str, TensorType]</code>, <em>optional</em>) &#x2014;
You can give a tensor_type here to convert the lists of integers in PyTorch/TensorFlow/Numpy Tensors at
initialization.`,name:"tensor_type"}]}}),Fe=new z({props:{name:"convert_to_tensors",anchor:"transformers.BatchFeature.convert_to_tensors",parameters:[{name:"tensor_type",val:": typing.Union[str, transformers.file_utils.TensorType, NoneType] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/feature_extraction_utils.py#L117",parametersDescription:[{anchor:"transformers.BatchFeature.convert_to_tensors.tensor_type",description:`<strong>tensor_type</strong> (<code>str</code> or <a href="/docs/transformers/pr_15839/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
The type of tensors to use. If <code>str</code>, should be one of the values of the enum
<a href="/docs/transformers/pr_15839/en/internal/file_utils#transformers.TensorType">TensorType</a>. If <code>None</code>, no modification is done.`,name:"tensor_type"}]}}),Te=new z({props:{name:"to",anchor:"transformers.BatchFeature.to",parameters:[{name:"device",val:": typing.Union[str, ForwardRef('torch.device')]"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/feature_extraction_utils.py#L182",parametersDescription:[{anchor:"transformers.BatchFeature.to.device",description:"<strong>device</strong> (<code>str</code> or <code>torch.device</code>) &#x2014; The device to put the tensors on.",name:"device"}],returnDescription:`
<p>The same instance after modification.</p>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.BatchFeature"
>BatchFeature</a></p>
`}}),Ie=new zt({}),ze=new z({props:{name:"class transformers.ImageFeatureExtractionMixin",anchor:"transformers.ImageFeatureExtractionMixin",parameters:[],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/image_utils.py#L76"}}),Pe=new z({props:{name:"center_crop",anchor:"transformers.ImageFeatureExtractionMixin.center_crop",parameters:[{name:"image",val:""},{name:"size",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/image_utils.py#L249",parametersDescription:[{anchor:"transformers.ImageFeatureExtractionMixin.center_crop.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code> or <code>np.ndarray</code> or <code>torch.Tensor</code>) &#x2014;
The image to resize.`,name:"image"},{anchor:"transformers.ImageFeatureExtractionMixin.center_crop.size",description:`<strong>size</strong> (<code>int</code> or <code>Tuple[int, int]</code>) &#x2014;
The size to which crop the image.`,name:"size"}]}}),Me=new z({props:{name:"normalize",anchor:"transformers.ImageFeatureExtractionMixin.normalize",parameters:[{name:"image",val:""},{name:"mean",val:""},{name:"std",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/image_utils.py#L151",parametersDescription:[{anchor:"transformers.ImageFeatureExtractionMixin.normalize.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code> or <code>np.ndarray</code> or <code>torch.Tensor</code>) &#x2014;
The image to normalize.`,name:"image"},{anchor:"transformers.ImageFeatureExtractionMixin.normalize.mean",description:`<strong>mean</strong> (<code>List[float]</code> or <code>np.ndarray</code> or <code>torch.Tensor</code>) &#x2014;
The mean (per channel) to use for normalization.`,name:"mean"},{anchor:"transformers.ImageFeatureExtractionMixin.normalize.std",description:`<strong>std</strong> (<code>List[float]</code> or <code>np.ndarray</code> or <code>torch.Tensor</code>) &#x2014;
The standard deviation (per channel) to use for normalization.`,name:"std"}]}}),De=new z({props:{name:"resize",anchor:"transformers.ImageFeatureExtractionMixin.resize",parameters:[{name:"image",val:""},{name:"size",val:""},{name:"resample",val:" = 2"},{name:"default_to_square",val:" = True"},{name:"max_size",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/image_utils.py#L187",parametersDescription:[{anchor:"transformers.ImageFeatureExtractionMixin.resize.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code> or <code>np.ndarray</code> or <code>torch.Tensor</code>) &#x2014;
The image to resize.`,name:"image"},{anchor:"transformers.ImageFeatureExtractionMixin.resize.size",description:`<strong>size</strong> (<code>int</code> or <code>Tuple[int, int]</code>) &#x2014;
The size to use for resizing the image. If <code>size</code> is a sequence like (h, w), output size will be
matched to this.</p>
<p>If <code>size</code> is an int and <code>default_to_square</code> is <code>True</code>, then image will be resized to (size, size). If
<code>size</code> is an int and <code>default_to_square</code> is <code>False</code>, then smaller edge of the image will be matched to
this number. i.e, if height &gt; width, then image will be rescaled to (size * height / width, size).`,name:"size"},{anchor:"transformers.ImageFeatureExtractionMixin.resize.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>PIL.Image.BILINEAR</code>) &#x2014;
The filter to user for resampling.`,name:"resample"},{anchor:"transformers.ImageFeatureExtractionMixin.resize.default_to_square",description:`<strong>default_to_square</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
How to convert <code>size</code> when it is a single int. If set to <code>True</code>, the <code>size</code> will be converted to a
square (<code>size</code>,<code>size</code>). If set to <code>False</code>, will replicate
<a href="https://pytorch.org/vision/stable/transforms.html#torchvision.transforms.Resize" rel="nofollow"><code>torchvision.transforms.Resize</code></a>
with support for resizing only the smallest edge and providing an optional <code>max_size</code>.`,name:"default_to_square"},{anchor:"transformers.ImageFeatureExtractionMixin.resize.max_size",description:`<strong>max_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The maximum allowed for the longer edge of the resized image: if the longer edge of the image is
greater than <code>max_size</code> after being resized according to <code>size</code>, then the image is resized again so
that the longer edge is equal to <code>max_size</code>. As a result, <code>size</code> might be overruled, i.e the smaller
edge may be shorter than <code>size</code>. Only used if <code>default_to_square</code> is <code>False</code>.`,name:"max_size"}]}}),Le=new z({props:{name:"to_numpy_array",anchor:"transformers.ImageFeatureExtractionMixin.to_numpy_array",parameters:[{name:"image",val:""},{name:"rescale",val:" = None"},{name:"channel_first",val:" = True"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/image_utils.py#L118",parametersDescription:[{anchor:"transformers.ImageFeatureExtractionMixin.to_numpy_array.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code> or <code>np.ndarray</code> or <code>torch.Tensor</code>) &#x2014;
The image to convert to a NumPy array.`,name:"image"},{anchor:"transformers.ImageFeatureExtractionMixin.to_numpy_array.rescale",description:`<strong>rescale</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to apply the scaling factor (to make pixel values floats between 0. and 1.). Will
default to <code>True</code> if the image is a PIL Image or an array/tensor of integers, <code>False</code> otherwise.`,name:"rescale"},{anchor:"transformers.ImageFeatureExtractionMixin.to_numpy_array.channel_first",description:`<strong>channel_first</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to permute the dimensions of the image to put the channel dimension first.`,name:"channel_first"}]}}),Ne=new z({props:{name:"to_pil_image",anchor:"transformers.ImageFeatureExtractionMixin.to_pil_image",parameters:[{name:"image",val:""},{name:"rescale",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/image_utils.py#L88",parametersDescription:[{anchor:"transformers.ImageFeatureExtractionMixin.to_pil_image.image",description:`<strong>image</strong> (<code>PIL.Image.Image</code> or <code>numpy.ndarray</code> or <code>torch.Tensor</code>) &#x2014;
The image to convert to the PIL Image format.`,name:"image"},{anchor:"transformers.ImageFeatureExtractionMixin.to_pil_image.rescale",description:`<strong>rescale</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to apply the scaling factor (to make pixel values integers between 0 and 255). Will
default to <code>True</code> if the image type is a floating type, <code>False</code> otherwise.`,name:"rescale"}]}}),{c(){m=a("meta"),F=c(),p=a("h1"),E=a("a"),P=a("span"),f($.$$.fragment),T=c(),S=a("span"),O=s("Feature Extractor"),q=c(),M=a("p"),Be=s(`A feature extractor is in charge of preparing input features for a multi-modal model. This includes feature extraction
from sequences, `),Ke=a("em"),tr=s("e.g."),rr=s(`, pre-processing audio files to Log-Mel Spectrogram features, feature extraction from images
`),Qe=a("em"),ar=s("e.g."),or=s(` cropping image image files, but also padding, normalization, and conversion to Numpy, PyTorch, and TensorFlow
tensors.`),Pt=c(),W=a("h2"),Q=a("a"),Xe=a("span"),f(he.$$.fragment),nr=c(),Ze=a("span"),sr=s("FeatureExtractionMixin"),qt=c(),D=a("div"),f(ge.$$.fragment),ir=c(),et=a("p"),cr=s(`This is a feature extraction mixin used to provide saving/loading functionality for sequential and image feature
extractors.`),dr=c(),k=a("div"),f(_e.$$.fragment),lr=c(),j=a("p"),mr=s("Instantiate a type of "),Ce=a("a"),ur=s("FeatureExtractionMixin"),pr=s(" from a feature extractor, "),tt=a("em"),fr=s("e.g."),hr=s(` a
derived class of `),Ve=a("a"),gr=s("SequenceFeatureExtractor"),_r=s("."),vr=c(),f(X.$$.fragment),xr=c(),rt=a("p"),yr=s("Examples:"),Er=c(),f(ve.$$.fragment),$r=c(),Z=a("div"),f(xe.$$.fragment),br=c(),H=a("p"),wr=s("Save a feature_extractor object to the directory "),at=a("code"),Fr=s("save_directory"),Tr=s(`, so that it can be re-loaded using the
`),Oe=a("a"),kr=s("from_pretrained()"),Ir=s(" class method."),Mt=c(),U=a("h2"),ee=a("a"),ot=a("span"),f(ye.$$.fragment),zr=c(),nt=a("span"),Pr=s("SequenceFeatureExtractor"),Dt=c(),A=a("div"),f(Ee.$$.fragment),qr=c(),st=a("p"),Mr=s("This is a general feature extraction class for speech recognition."),Dr=c(),N=a("div"),f($e.$$.fragment),Lr=c(),it=a("p"),Sr=s(`Pad input values / input vectors or a batch of input values / input vectors up to predefined length or to the
max sequence length in the batch.`),Nr=c(),R=a("p"),jr=s("Padding side (left/right) padding values are defined at the feature extractor level (with "),ct=a("code"),Ar=s("self.padding_side"),Br=s(`,
`),dt=a("code"),Cr=s("self.padding_value"),Vr=s(")"),Or=c(),f(te.$$.fragment),Lt=c(),J=a("h2"),re=a("a"),lt=a("span"),f(be.$$.fragment),Wr=c(),mt=a("span"),Hr=s("BatchFeature"),St=c(),w=a("div"),f(we.$$.fragment),Ur=c(),Y=a("p"),Rr=s("Holds the output of the "),We=a("a"),Jr=s("pad()"),Yr=s(" and feature extractor specific "),ut=a("code"),Gr=s("__call__"),Kr=s(" methods."),Qr=c(),pt=a("p"),Xr=s("This class is derived from a python dictionary and can be used as a dictionary."),Zr=c(),ae=a("div"),f(Fe.$$.fragment),ea=c(),ft=a("p"),ta=s("Convert the inner content to tensors."),ra=c(),oe=a("div"),f(Te.$$.fragment),aa=c(),ke=a("p"),oa=s("Send all values to device by calling "),ht=a("code"),na=s("v.to(device)"),sa=s(" (PyTorch only)."),Nt=c(),G=a("h2"),ne=a("a"),gt=a("span"),f(Ie.$$.fragment),ia=c(),_t=a("span"),ca=s("ImageFeatureExtractionMixin"),jt=c(),b=a("div"),f(ze.$$.fragment),da=c(),vt=a("p"),la=s("Mixin that contain utilities for preparing image features."),ma=c(),se=a("div"),f(Pe.$$.fragment),ua=c(),qe=a("p"),pa=s("Crops "),xt=a("code"),fa=s("image"),ha=s(` to the given size using a center crop. Note that if the image is too small to be cropped to the
size given, it will be padded (so the returned result has the size asked).`),ga=c(),ie=a("div"),f(Me.$$.fragment),_a=c(),L=a("p"),va=s("Normalizes "),yt=a("code"),xa=s("image"),ya=s(" with "),Et=a("code"),Ea=s("mean"),$a=s(" and "),$t=a("code"),ba=s("std"),wa=s(". Note that this will trigger a conversion of "),bt=a("code"),Fa=s("image"),Ta=s(` to a NumPy array
if it\u2019s a PIL Image.`),ka=c(),ce=a("div"),f(De.$$.fragment),Ia=c(),K=a("p"),za=s("Resizes "),wt=a("code"),Pa=s("image"),qa=s(". Note that this will trigger a conversion of "),Ft=a("code"),Ma=s("image"),Da=s(" to a PIL Image."),La=c(),de=a("div"),f(Le.$$.fragment),Sa=c(),Se=a("p"),Na=s("Converts "),Tt=a("code"),ja=s("image"),Aa=s(` to a numpy array. Optionally rescales it and puts the channel dimension as the first
dimension.`),Ba=c(),le=a("div"),f(Ne.$$.fragment),Ca=c(),je=a("p"),Va=s("Converts "),kt=a("code"),Oa=s("image"),Wa=s(` to a PIL Image. Optionally rescales it and puts the channel dimension back as the last axis if
needed.`),this.h()},l(t){const u=jo('[data-svelte="svelte-1phssyn"]',document.head);m=o(u,"META",{name:!0,content:!0}),u.forEach(r),F=d(t),p=o(t,"H1",{class:!0});var Ae=n(p);E=o(Ae,"A",{id:!0,class:!0,href:!0});var It=n(E);P=o(It,"SPAN",{});var Ha=n(P);h($.$$.fragment,Ha),Ha.forEach(r),It.forEach(r),T=d(Ae),S=o(Ae,"SPAN",{});var Ua=n(S);O=i(Ua,"Feature Extractor"),Ua.forEach(r),Ae.forEach(r),q=d(t),M=o(t,"P",{});var He=n(M);Be=i(He,`A feature extractor is in charge of preparing input features for a multi-modal model. This includes feature extraction
from sequences, `),Ke=o(He,"EM",{});var Ra=n(Ke);tr=i(Ra,"e.g."),Ra.forEach(r),rr=i(He,`, pre-processing audio files to Log-Mel Spectrogram features, feature extraction from images
`),Qe=o(He,"EM",{});var Ja=n(Qe);ar=i(Ja,"e.g."),Ja.forEach(r),or=i(He,` cropping image image files, but also padding, normalization, and conversion to Numpy, PyTorch, and TensorFlow
tensors.`),He.forEach(r),Pt=d(t),W=o(t,"H2",{class:!0});var Bt=n(W);Q=o(Bt,"A",{id:!0,class:!0,href:!0});var Ya=n(Q);Xe=o(Ya,"SPAN",{});var Ga=n(Xe);h(he.$$.fragment,Ga),Ga.forEach(r),Ya.forEach(r),nr=d(Bt),Ze=o(Bt,"SPAN",{});var Ka=n(Ze);sr=i(Ka,"FeatureExtractionMixin"),Ka.forEach(r),Bt.forEach(r),qt=d(t),D=o(t,"DIV",{class:!0});var me=n(D);h(ge.$$.fragment,me),ir=d(me),et=o(me,"P",{});var Qa=n(et);cr=i(Qa,`This is a feature extraction mixin used to provide saving/loading functionality for sequential and image feature
extractors.`),Qa.forEach(r),dr=d(me),k=o(me,"DIV",{class:!0});var B=n(k);h(_e.$$.fragment,B),lr=d(B),j=o(B,"P",{});var ue=n(j);mr=i(ue,"Instantiate a type of "),Ce=o(ue,"A",{href:!0});var Xa=n(Ce);ur=i(Xa,"FeatureExtractionMixin"),Xa.forEach(r),pr=i(ue," from a feature extractor, "),tt=o(ue,"EM",{});var Za=n(tt);fr=i(Za,"e.g."),Za.forEach(r),hr=i(ue,` a
derived class of `),Ve=o(ue,"A",{href:!0});var eo=n(Ve);gr=i(eo,"SequenceFeatureExtractor"),eo.forEach(r),_r=i(ue,"."),ue.forEach(r),vr=d(B),h(X.$$.fragment,B),xr=d(B),rt=o(B,"P",{});var to=n(rt);yr=i(to,"Examples:"),to.forEach(r),Er=d(B),h(ve.$$.fragment,B),B.forEach(r),$r=d(me),Z=o(me,"DIV",{class:!0});var Ct=n(Z);h(xe.$$.fragment,Ct),br=d(Ct),H=o(Ct,"P",{});var Ue=n(H);wr=i(Ue,"Save a feature_extractor object to the directory "),at=o(Ue,"CODE",{});var ro=n(at);Fr=i(ro,"save_directory"),ro.forEach(r),Tr=i(Ue,`, so that it can be re-loaded using the
`),Oe=o(Ue,"A",{href:!0});var ao=n(Oe);kr=i(ao,"from_pretrained()"),ao.forEach(r),Ir=i(Ue," class method."),Ue.forEach(r),Ct.forEach(r),me.forEach(r),Mt=d(t),U=o(t,"H2",{class:!0});var Vt=n(U);ee=o(Vt,"A",{id:!0,class:!0,href:!0});var oo=n(ee);ot=o(oo,"SPAN",{});var no=n(ot);h(ye.$$.fragment,no),no.forEach(r),oo.forEach(r),zr=d(Vt),nt=o(Vt,"SPAN",{});var so=n(nt);Pr=i(so,"SequenceFeatureExtractor"),so.forEach(r),Vt.forEach(r),Dt=d(t),A=o(t,"DIV",{class:!0});var Re=n(A);h(Ee.$$.fragment,Re),qr=d(Re),st=o(Re,"P",{});var io=n(st);Mr=i(io,"This is a general feature extraction class for speech recognition."),io.forEach(r),Dr=d(Re),N=o(Re,"DIV",{class:!0});var pe=n(N);h($e.$$.fragment,pe),Lr=d(pe),it=o(pe,"P",{});var co=n(it);Sr=i(co,`Pad input values / input vectors or a batch of input values / input vectors up to predefined length or to the
max sequence length in the batch.`),co.forEach(r),Nr=d(pe),R=o(pe,"P",{});var Je=n(R);jr=i(Je,"Padding side (left/right) padding values are defined at the feature extractor level (with "),ct=o(Je,"CODE",{});var lo=n(ct);Ar=i(lo,"self.padding_side"),lo.forEach(r),Br=i(Je,`,
`),dt=o(Je,"CODE",{});var mo=n(dt);Cr=i(mo,"self.padding_value"),mo.forEach(r),Vr=i(Je,")"),Je.forEach(r),Or=d(pe),h(te.$$.fragment,pe),pe.forEach(r),Re.forEach(r),Lt=d(t),J=o(t,"H2",{class:!0});var Ot=n(J);re=o(Ot,"A",{id:!0,class:!0,href:!0});var uo=n(re);lt=o(uo,"SPAN",{});var po=n(lt);h(be.$$.fragment,po),po.forEach(r),uo.forEach(r),Wr=d(Ot),mt=o(Ot,"SPAN",{});var fo=n(mt);Hr=i(fo,"BatchFeature"),fo.forEach(r),Ot.forEach(r),St=d(t),w=o(t,"DIV",{class:!0});var C=n(w);h(we.$$.fragment,C),Ur=d(C),Y=o(C,"P",{});var Ye=n(Y);Rr=i(Ye,"Holds the output of the "),We=o(Ye,"A",{href:!0});var ho=n(We);Jr=i(ho,"pad()"),ho.forEach(r),Yr=i(Ye," and feature extractor specific "),ut=o(Ye,"CODE",{});var go=n(ut);Gr=i(go,"__call__"),go.forEach(r),Kr=i(Ye," methods."),Ye.forEach(r),Qr=d(C),pt=o(C,"P",{});var _o=n(pt);Xr=i(_o,"This class is derived from a python dictionary and can be used as a dictionary."),_o.forEach(r),Zr=d(C),ae=o(C,"DIV",{class:!0});var Wt=n(ae);h(Fe.$$.fragment,Wt),ea=d(Wt),ft=o(Wt,"P",{});var vo=n(ft);ta=i(vo,"Convert the inner content to tensors."),vo.forEach(r),Wt.forEach(r),ra=d(C),oe=o(C,"DIV",{class:!0});var Ht=n(oe);h(Te.$$.fragment,Ht),aa=d(Ht),ke=o(Ht,"P",{});var Ut=n(ke);oa=i(Ut,"Send all values to device by calling "),ht=o(Ut,"CODE",{});var xo=n(ht);na=i(xo,"v.to(device)"),xo.forEach(r),sa=i(Ut," (PyTorch only)."),Ut.forEach(r),Ht.forEach(r),C.forEach(r),Nt=d(t),G=o(t,"H2",{class:!0});var Rt=n(G);ne=o(Rt,"A",{id:!0,class:!0,href:!0});var yo=n(ne);gt=o(yo,"SPAN",{});var Eo=n(gt);h(Ie.$$.fragment,Eo),Eo.forEach(r),yo.forEach(r),ia=d(Rt),_t=o(Rt,"SPAN",{});var $o=n(_t);ca=i($o,"ImageFeatureExtractionMixin"),$o.forEach(r),Rt.forEach(r),jt=d(t),b=o(t,"DIV",{class:!0});var I=n(b);h(ze.$$.fragment,I),da=d(I),vt=o(I,"P",{});var bo=n(vt);la=i(bo,"Mixin that contain utilities for preparing image features."),bo.forEach(r),ma=d(I),se=o(I,"DIV",{class:!0});var Jt=n(se);h(Pe.$$.fragment,Jt),ua=d(Jt),qe=o(Jt,"P",{});var Yt=n(qe);pa=i(Yt,"Crops "),xt=o(Yt,"CODE",{});var wo=n(xt);fa=i(wo,"image"),wo.forEach(r),ha=i(Yt,` to the given size using a center crop. Note that if the image is too small to be cropped to the
size given, it will be padded (so the returned result has the size asked).`),Yt.forEach(r),Jt.forEach(r),ga=d(I),ie=o(I,"DIV",{class:!0});var Gt=n(ie);h(Me.$$.fragment,Gt),_a=d(Gt),L=o(Gt,"P",{});var V=n(L);va=i(V,"Normalizes "),yt=o(V,"CODE",{});var Fo=n(yt);xa=i(Fo,"image"),Fo.forEach(r),ya=i(V," with "),Et=o(V,"CODE",{});var To=n(Et);Ea=i(To,"mean"),To.forEach(r),$a=i(V," and "),$t=o(V,"CODE",{});var ko=n($t);ba=i(ko,"std"),ko.forEach(r),wa=i(V,". Note that this will trigger a conversion of "),bt=o(V,"CODE",{});var Io=n(bt);Fa=i(Io,"image"),Io.forEach(r),Ta=i(V,` to a NumPy array
if it\u2019s a PIL Image.`),V.forEach(r),Gt.forEach(r),ka=d(I),ce=o(I,"DIV",{class:!0});var Kt=n(ce);h(De.$$.fragment,Kt),Ia=d(Kt),K=o(Kt,"P",{});var Ge=n(K);za=i(Ge,"Resizes "),wt=o(Ge,"CODE",{});var zo=n(wt);Pa=i(zo,"image"),zo.forEach(r),qa=i(Ge,". Note that this will trigger a conversion of "),Ft=o(Ge,"CODE",{});var Po=n(Ft);Ma=i(Po,"image"),Po.forEach(r),Da=i(Ge," to a PIL Image."),Ge.forEach(r),Kt.forEach(r),La=d(I),de=o(I,"DIV",{class:!0});var Qt=n(de);h(Le.$$.fragment,Qt),Sa=d(Qt),Se=o(Qt,"P",{});var Xt=n(Se);Na=i(Xt,"Converts "),Tt=o(Xt,"CODE",{});var qo=n(Tt);ja=i(qo,"image"),qo.forEach(r),Aa=i(Xt,` to a numpy array. Optionally rescales it and puts the channel dimension as the first
dimension.`),Xt.forEach(r),Qt.forEach(r),Ba=d(I),le=o(I,"DIV",{class:!0});var Zt=n(le);h(Ne.$$.fragment,Zt),Ca=d(Zt),je=o(Zt,"P",{});var er=n(je);Va=i(er,"Converts "),kt=o(er,"CODE",{});var Mo=n(kt);Oa=i(Mo,"image"),Mo.forEach(r),Wa=i(er,` to a PIL Image. Optionally rescales it and puts the channel dimension back as the last axis if
needed.`),er.forEach(r),Zt.forEach(r),I.forEach(r),this.h()},h(){l(m,"name","hf:doc:metadata"),l(m,"content",JSON.stringify(Oo)),l(E,"id","feature-extractor"),l(E,"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(E,"href","#feature-extractor"),l(p,"class","relative group"),l(Q,"id","transformers.FeatureExtractionMixin"),l(Q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Q,"href","#transformers.FeatureExtractionMixin"),l(W,"class","relative group"),l(Ce,"href","/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin"),l(Ve,"href","/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor"),l(k,"class","docstring"),l(Oe,"href","/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),l(Z,"class","docstring"),l(D,"class","docstring"),l(ee,"id","transformers.SequenceFeatureExtractor"),l(ee,"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(ee,"href","#transformers.SequenceFeatureExtractor"),l(U,"class","relative group"),l(N,"class","docstring"),l(A,"class","docstring"),l(re,"id","transformers.BatchFeature"),l(re,"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(re,"href","#transformers.BatchFeature"),l(J,"class","relative group"),l(We,"href","/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor.pad"),l(ae,"class","docstring"),l(oe,"class","docstring"),l(w,"class","docstring"),l(ne,"id","transformers.ImageFeatureExtractionMixin"),l(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"),l(ne,"href","#transformers.ImageFeatureExtractionMixin"),l(G,"class","relative group"),l(se,"class","docstring"),l(ie,"class","docstring"),l(ce,"class","docstring"),l(de,"class","docstring"),l(le,"class","docstring"),l(b,"class","docstring")},m(t,u){e(document.head,m),y(t,F,u),y(t,p,u),e(p,E),e(E,P),g($,P,null),e(p,T),e(p,S),e(S,O),y(t,q,u),y(t,M,u),e(M,Be),e(M,Ke),e(Ke,tr),e(M,rr),e(M,Qe),e(Qe,ar),e(M,or),y(t,Pt,u),y(t,W,u),e(W,Q),e(Q,Xe),g(he,Xe,null),e(W,nr),e(W,Ze),e(Ze,sr),y(t,qt,u),y(t,D,u),g(ge,D,null),e(D,ir),e(D,et),e(et,cr),e(D,dr),e(D,k),g(_e,k,null),e(k,lr),e(k,j),e(j,mr),e(j,Ce),e(Ce,ur),e(j,pr),e(j,tt),e(tt,fr),e(j,hr),e(j,Ve),e(Ve,gr),e(j,_r),e(k,vr),g(X,k,null),e(k,xr),e(k,rt),e(rt,yr),e(k,Er),g(ve,k,null),e(D,$r),e(D,Z),g(xe,Z,null),e(Z,br),e(Z,H),e(H,wr),e(H,at),e(at,Fr),e(H,Tr),e(H,Oe),e(Oe,kr),e(H,Ir),y(t,Mt,u),y(t,U,u),e(U,ee),e(ee,ot),g(ye,ot,null),e(U,zr),e(U,nt),e(nt,Pr),y(t,Dt,u),y(t,A,u),g(Ee,A,null),e(A,qr),e(A,st),e(st,Mr),e(A,Dr),e(A,N),g($e,N,null),e(N,Lr),e(N,it),e(it,Sr),e(N,Nr),e(N,R),e(R,jr),e(R,ct),e(ct,Ar),e(R,Br),e(R,dt),e(dt,Cr),e(R,Vr),e(N,Or),g(te,N,null),y(t,Lt,u),y(t,J,u),e(J,re),e(re,lt),g(be,lt,null),e(J,Wr),e(J,mt),e(mt,Hr),y(t,St,u),y(t,w,u),g(we,w,null),e(w,Ur),e(w,Y),e(Y,Rr),e(Y,We),e(We,Jr),e(Y,Yr),e(Y,ut),e(ut,Gr),e(Y,Kr),e(w,Qr),e(w,pt),e(pt,Xr),e(w,Zr),e(w,ae),g(Fe,ae,null),e(ae,ea),e(ae,ft),e(ft,ta),e(w,ra),e(w,oe),g(Te,oe,null),e(oe,aa),e(oe,ke),e(ke,oa),e(ke,ht),e(ht,na),e(ke,sa),y(t,Nt,u),y(t,G,u),e(G,ne),e(ne,gt),g(Ie,gt,null),e(G,ia),e(G,_t),e(_t,ca),y(t,jt,u),y(t,b,u),g(ze,b,null),e(b,da),e(b,vt),e(vt,la),e(b,ma),e(b,se),g(Pe,se,null),e(se,ua),e(se,qe),e(qe,pa),e(qe,xt),e(xt,fa),e(qe,ha),e(b,ga),e(b,ie),g(Me,ie,null),e(ie,_a),e(ie,L),e(L,va),e(L,yt),e(yt,xa),e(L,ya),e(L,Et),e(Et,Ea),e(L,$a),e(L,$t),e($t,ba),e(L,wa),e(L,bt),e(bt,Fa),e(L,Ta),e(b,ka),e(b,ce),g(De,ce,null),e(ce,Ia),e(ce,K),e(K,za),e(K,wt),e(wt,Pa),e(K,qa),e(K,Ft),e(Ft,Ma),e(K,Da),e(b,La),e(b,de),g(Le,de,null),e(de,Sa),e(de,Se),e(Se,Na),e(Se,Tt),e(Tt,ja),e(Se,Aa),e(b,Ba),e(b,le),g(Ne,le,null),e(le,Ca),e(le,je),e(je,Va),e(je,kt),e(kt,Oa),e(je,Wa),At=!0},p(t,[u]){const Ae={};u&2&&(Ae.$$scope={dirty:u,ctx:t}),X.$set(Ae);const It={};u&2&&(It.$$scope={dirty:u,ctx:t}),te.$set(It)},i(t){At||(_($.$$.fragment,t),_(he.$$.fragment,t),_(ge.$$.fragment,t),_(_e.$$.fragment,t),_(X.$$.fragment,t),_(ve.$$.fragment,t),_(xe.$$.fragment,t),_(ye.$$.fragment,t),_(Ee.$$.fragment,t),_($e.$$.fragment,t),_(te.$$.fragment,t),_(be.$$.fragment,t),_(we.$$.fragment,t),_(Fe.$$.fragment,t),_(Te.$$.fragment,t),_(Ie.$$.fragment,t),_(ze.$$.fragment,t),_(Pe.$$.fragment,t),_(Me.$$.fragment,t),_(De.$$.fragment,t),_(Le.$$.fragment,t),_(Ne.$$.fragment,t),At=!0)},o(t){v($.$$.fragment,t),v(he.$$.fragment,t),v(ge.$$.fragment,t),v(_e.$$.fragment,t),v(X.$$.fragment,t),v(ve.$$.fragment,t),v(xe.$$.fragment,t),v(ye.$$.fragment,t),v(Ee.$$.fragment,t),v($e.$$.fragment,t),v(te.$$.fragment,t),v(be.$$.fragment,t),v(we.$$.fragment,t),v(Fe.$$.fragment,t),v(Te.$$.fragment,t),v(Ie.$$.fragment,t),v(ze.$$.fragment,t),v(Pe.$$.fragment,t),v(Me.$$.fragment,t),v(De.$$.fragment,t),v(Le.$$.fragment,t),v(Ne.$$.fragment,t),At=!1},d(t){r(m),t&&r(F),t&&r(p),x($),t&&r(q),t&&r(M),t&&r(Pt),t&&r(W),x(he),t&&r(qt),t&&r(D),x(ge),x(_e),x(X),x(ve),x(xe),t&&r(Mt),t&&r(U),x(ye),t&&r(Dt),t&&r(A),x(Ee),x($e),x(te),t&&r(Lt),t&&r(J),x(be),t&&r(St),t&&r(w),x(we),x(Fe),x(Te),t&&r(Nt),t&&r(G),x(Ie),t&&r(jt),t&&r(b),x(ze),x(Pe),x(Me),x(De),x(Le),x(Ne)}}}const Oo={local:"feature-extractor",sections:[{local:"transformers.FeatureExtractionMixin",title:"FeatureExtractionMixin"},{local:"transformers.SequenceFeatureExtractor",title:"SequenceFeatureExtractor"},{local:"transformers.BatchFeature",title:"BatchFeature"},{local:"transformers.ImageFeatureExtractionMixin",title:"ImageFeatureExtractionMixin"}],title:"Feature Extractor"};function Wo(fe,m,F){let{fw:p}=m;return fe.$$set=E=>{"fw"in E&&F(0,p=E.fw)},[p]}class Ko extends Lo{constructor(m){super();So(this,m,Wo,Vo,No,{fw:0})}}export{Ko as default,Oo as metadata};
