import{s as ep,o as lp,n as z}from"../chunks/scheduler.9bc65507.js";import{S as tp,i as pp,g as p,s as l,u,A as rp,h as r,f as n,c as t,j as T,v as o,y as m,k as g,o as y,a as e,w as i,d as j,t as b,x as d}from"../chunks/index.78c82d43.js";import{T as Pa}from"../chunks/Tip.87d55b76.js";import{Y as cp}from"../chunks/Youtube.b19762b6.js";import{I as H}from"../chunks/IconCopyLink.bedaa44d.js";import{C as w}from"../chunks/CodeBlock.73e038be.js";import{D as hp}from"../chunks/DocNotebookDropdown.31840a23.js";import{F as mp,M as np}from"../chunks/Markdown.1b9b4e1c.js";function up(J){let c,f="<code>AutoProcessor</code> <strong>always</strong> works and automatically chooses the correct class for the model you’re using, whether you’re using a tokenizer, image processor, feature extractor or processor.";return{c(){c=p("p"),c.innerHTML=f},l(h){c=r(h,"P",{"data-svelte-h":!0}),m(c)!=="svelte-15om5of"&&(c.innerHTML=f)},m(h,M){e(h,c,M)},p:z,d(h){h&&n(c)}}}function op(J){let c,f="If you plan on using a pretrained model, it’s important to use the associated pretrained tokenizer. This ensures the text is split the same way as the pretraining corpus, and uses the same corresponding tokens-to-index (usually referred to as the <em>vocab</em>) during pretraining.";return{c(){c=p("p"),c.innerHTML=f},l(h){c=r(h,"P",{"data-svelte-h":!0}),m(c)!=="svelte-1irmkk5"&&(c.innerHTML=f)},m(h,M){e(h,c,M)},p:z,d(h){h&&n(c)}}}function ip(J){let c,f='Check out the <a href="./pad_truncation">Padding and truncation</a> concept guide to learn more different padding and truncation arguments.';return{c(){c=p("p"),c.innerHTML=f},l(h){c=r(h,"P",{"data-svelte-h":!0}),m(c)!=="svelte-4vcsqp"&&(c.innerHTML=f)},m(h,M){e(h,c,M)},p:z,d(h){h&&n(c)}}}function jp(J){let c,f;return c=new w({props:{code:"YmF0Y2hfc2VudGVuY2VzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIyQnV0JTIwd2hhdCUyMGFib3V0JTIwc2Vjb25kJTIwYnJlYWtmYXN0JTNGJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyRG9uJ3QlMjB0aGluayUyMGhlJTIwa25vd3MlMjBhYm91dCUyMHNlY29uZCUyMGJyZWFrZmFzdCUyQyUyMFBpcC4lMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJXaGF0JTIwYWJvdXQlMjBlbGV2ZW5zaWVzJTNGJTIyJTJDJTBBJTVEJTBBZW5jb2RlZF9pbnB1dCUyMCUzRCUyMHRva2VuaXplcihiYXRjaF9zZW50ZW5jZXMlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHRydW5jYXRpb24lM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFwcmludChlbmNvZGVkX2lucHV0KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>batch_sentences = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;But what about second breakfast?&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Don&#x27;t think he knows about second breakfast, Pip.&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;What about elevensies?&quot;</span>,
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_input = tokenizer(batch_sentences, padding=<span class="hljs-literal">True</span>, truncation=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoded_input)
{<span class="hljs-string">&#x27;input_ids&#x27;</span>: tensor([[<span class="hljs-number">101</span>, <span class="hljs-number">1252</span>, <span class="hljs-number">1184</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">1248</span>, <span class="hljs-number">6462</span>, <span class="hljs-number">136</span>, <span class="hljs-number">102</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
                      [<span class="hljs-number">101</span>, <span class="hljs-number">1790</span>, <span class="hljs-number">112</span>, <span class="hljs-number">189</span>, <span class="hljs-number">1341</span>, <span class="hljs-number">1119</span>, <span class="hljs-number">3520</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">1248</span>, <span class="hljs-number">6462</span>, <span class="hljs-number">117</span>, <span class="hljs-number">21902</span>, <span class="hljs-number">1643</span>, <span class="hljs-number">119</span>, <span class="hljs-number">102</span>],
                      [<span class="hljs-number">101</span>, <span class="hljs-number">1327</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">5450</span>, <span class="hljs-number">23434</span>, <span class="hljs-number">136</span>, <span class="hljs-number">102</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]]),
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: tensor([[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
                           [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
                           [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]]),
 <span class="hljs-string">&#x27;attention_mask&#x27;</span>: tensor([[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
                           [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
                           [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]])}`,wrap:!1}}),{c(){u(c.$$.fragment)},l(h){o(c.$$.fragment,h)},m(h,M){i(c,h,M),f=!0},p:z,i(h){f||(j(c.$$.fragment,h),f=!0)},o(h){b(c.$$.fragment,h),f=!1},d(h){d(c,h)}}}function bp(J){let c,f;return c=new np({props:{$$slots:{default:[jp]},$$scope:{ctx:J}}}),{c(){u(c.$$.fragment)},l(h){o(c.$$.fragment,h)},m(h,M){i(c,h,M),f=!0},p(h,M){const v={};M&2&&(v.$$scope={dirty:M,ctx:h}),c.$set(v)},i(h){f||(j(c.$$.fragment,h),f=!0)},o(h){b(c.$$.fragment,h),f=!1},d(h){d(c,h)}}}function dp(J){let c,f;return c=new w({props:{code:"YmF0Y2hfc2VudGVuY2VzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIyQnV0JTIwd2hhdCUyMGFib3V0JTIwc2Vjb25kJTIwYnJlYWtmYXN0JTNGJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyRG9uJ3QlMjB0aGluayUyMGhlJTIwa25vd3MlMjBhYm91dCUyMHNlY29uZCUyMGJyZWFrZmFzdCUyQyUyMFBpcC4lMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJXaGF0JTIwYWJvdXQlMjBlbGV2ZW5zaWVzJTNGJTIyJTJDJTBBJTVEJTBBZW5jb2RlZF9pbnB1dCUyMCUzRCUyMHRva2VuaXplcihiYXRjaF9zZW50ZW5jZXMlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHRydW5jYXRpb24lM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFwcmludChlbmNvZGVkX2lucHV0KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>batch_sentences = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;But what about second breakfast?&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Don&#x27;t think he knows about second breakfast, Pip.&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;What about elevensies?&quot;</span>,
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_input = tokenizer(batch_sentences, padding=<span class="hljs-literal">True</span>, truncation=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoded_input)
{<span class="hljs-string">&#x27;input_ids&#x27;</span>: &lt;tf.Tensor: shape=(<span class="hljs-number">2</span>, <span class="hljs-number">9</span>), dtype=int32, numpy=
array([[<span class="hljs-number">101</span>, <span class="hljs-number">1252</span>, <span class="hljs-number">1184</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">1248</span>, <span class="hljs-number">6462</span>, <span class="hljs-number">136</span>, <span class="hljs-number">102</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
       [<span class="hljs-number">101</span>, <span class="hljs-number">1790</span>, <span class="hljs-number">112</span>, <span class="hljs-number">189</span>, <span class="hljs-number">1341</span>, <span class="hljs-number">1119</span>, <span class="hljs-number">3520</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">1248</span>, <span class="hljs-number">6462</span>, <span class="hljs-number">117</span>, <span class="hljs-number">21902</span>, <span class="hljs-number">1643</span>, <span class="hljs-number">119</span>, <span class="hljs-number">102</span>],
       [<span class="hljs-number">101</span>, <span class="hljs-number">1327</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">5450</span>, <span class="hljs-number">23434</span>, <span class="hljs-number">136</span>, <span class="hljs-number">102</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]],
      dtype=int32)&gt;,
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: &lt;tf.Tensor: shape=(<span class="hljs-number">2</span>, <span class="hljs-number">9</span>), dtype=int32, numpy=
array([[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
       [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
       [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]], dtype=int32)&gt;,
 <span class="hljs-string">&#x27;attention_mask&#x27;</span>: &lt;tf.Tensor: shape=(<span class="hljs-number">2</span>, <span class="hljs-number">9</span>), dtype=int32, numpy=
array([[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
       [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
       [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]], dtype=int32)&gt;}`,wrap:!1}}),{c(){u(c.$$.fragment)},l(h){o(c.$$.fragment,h)},m(h,M){i(c,h,M),f=!0},p:z,i(h){f||(j(c.$$.fragment,h),f=!0)},o(h){b(c.$$.fragment,h),f=!1},d(h){d(c,h)}}}function fp(J){let c,f;return c=new np({props:{$$slots:{default:[dp]},$$scope:{ctx:J}}}),{c(){u(c.$$.fragment)},l(h){o(c.$$.fragment,h)},m(h,M){i(c,h,M),f=!0},p(h,M){const v={};M&2&&(v.$$scope={dirty:M,ctx:h}),c.$set(v)},i(h){f||(j(c.$$.fragment,h),f=!0)},o(h){b(c.$$.fragment,h),f=!1},d(h){d(c,h)}}}function gp(J){let c,f=`Image preprocessing often follows some form of image augmentation. Both image preprocessing and image augmentation
transform image data, but they serve different purposes:`,h,M,v="<li>Image augmentation alters images in a way that can help prevent overfitting and increase the robustness of the model. You can get creative in how you augment your data - adjust brightness and colors, crop, rotate, resize, zoom, etc. However, be mindful not to change the meaning of the images with your augmentations.</li> <li>Image preprocessing guarantees that the images match the model’s expected input format. When fine-tuning a computer vision model, images must be preprocessed exactly as when the model was initially trained.</li>",$,_,I="You can use any library you like for image augmentation. For image preprocessing, use the <code>ImageProcessor</code> associated with the model.";return{c(){c=p("p"),c.textContent=f,h=l(),M=p("ul"),M.innerHTML=v,$=l(),_=p("p"),_.innerHTML=I},l(k){c=r(k,"P",{"data-svelte-h":!0}),m(c)!=="svelte-aepj6y"&&(c.textContent=f),h=t(k),M=r(k,"UL",{"data-svelte-h":!0}),m(M)!=="svelte-mzhu6i"&&(M.innerHTML=v),$=t(k),_=r(k,"P",{"data-svelte-h":!0}),m(_)!=="svelte-dwyc8n"&&(_.innerHTML=I)},m(k,x){e(k,c,x),e(k,h,x),e(k,M,x),e(k,$,x),e(k,_,x)},p:z,d(k){k&&(n(c),n(h),n(M),n($),n(_))}}}function Mp(J){let c,f="Use 🤗 Datasets <code>split</code> parameter to only load a small sample from the training split since the dataset is quite large!";return{c(){c=p("p"),c.innerHTML=f},l(h){c=r(h,"P",{"data-svelte-h":!0}),m(c)!=="svelte-14ltu7c"&&(c.innerHTML=f)},m(h,M){e(h,c,M)},p:z,d(h){h&&n(c)}}}function yp(J){let c,f=`In the example above we set <code>do_resize=False</code> because we have already resized the images in the image augmentation transformation,
and leveraged the <code>size</code> attribute from the appropriate <code>image_processor</code>. If you do not resize images during image augmentation,
leave this parameter out. By default, <code>ImageProcessor</code> will handle the resizing.`,h,M,v=`If you wish to normalize images as a part of the augmentation transformation, use the <code>image_processor.image_mean</code>,
and <code>image_processor.image_std</code> values.`;return{c(){c=p("p"),c.innerHTML=f,h=l(),M=p("p"),M.innerHTML=v},l($){c=r($,"P",{"data-svelte-h":!0}),m(c)!=="svelte-nqgnl7"&&(c.innerHTML=f),h=t($),M=r($,"P",{"data-svelte-h":!0}),m(M)!=="svelte-13w97bd"&&(M.innerHTML=v)},m($,_){e($,c,_),e($,h,_),e($,M,_)},p:z,d($){$&&(n(c),n(h),n(M))}}}function wp(J){let c,f=`For tasks like object detection, semantic segmentation, instance segmentation, and panoptic segmentation, <code>ImageProcessor</code>
offers post processing methods. These methods convert model’s raw outputs into meaningful predictions such as bounding boxes,
or segmentation maps.`;return{c(){c=p("p"),c.innerHTML=f},l(h){c=r(h,"P",{"data-svelte-h":!0}),m(c)!=="svelte-p4rlwj"&&(c.innerHTML=f)},m(h,M){e(h,c,M)},p:z,d(h){h&&n(c)}}}function Tp(J){let c,f,h,M,v,$,_,I,k,x,Gl="Preprocess",Mn,hs,yn,ms,Vl="Before you can train a model on a dataset, it needs to be preprocessed into the expected model input format. Whether your data is text, images, or audio, they need to be converted and assembled into batches of tensors. 🤗 Transformers provides a set of preprocessing classes to help prepare your data for the model. In this tutorial, you’ll learn that for:",wn,us,Bl='<li>Text, use a <a href="./main_classes/tokenizer">Tokenizer</a> to convert text into a sequence of tokens, create a numerical representation of the tokens, and assemble them into tensors.</li> <li>Speech and audio, use a <a href="./main_classes/feature_extractor">Feature extractor</a> to extract sequential features from audio waveforms and convert them into tensors.</li> <li>Image inputs use a <a href="./main_classes/image">ImageProcessor</a> to convert images into tensors.</li> <li>Multimodal inputs, use a <a href="./main_classes/processors">Processor</a> to combine a tokenizer and a feature extractor or image processor.</li>',Tn,q,Jn,os,Wl="Before you begin, install 🤗 Datasets so you can load some datasets to experiment with:",$n,is,vn,U,R,ln,js,vl,Sa,Nl="Natural Language Processing",_n,bs,kn,ds,Hl='The main tool for preprocessing textual data is a <a href="main_classes/tokenizer">tokenizer</a>. A tokenizer splits text into <em>tokens</em> according to a set of rules. The tokens are converted into numbers and then tensors, which become the model inputs. Any additional inputs required by the model are added by the tokenizer.',xn,X,In,fs,zl='Get started by loading a pretrained tokenizer with the <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoTokenizer.from_pretrained">AutoTokenizer.from_pretrained()</a> method. This downloads the <em>vocab</em> a model was pretrained with:',Un,gs,Cn,Ms,ql="Then pass your text to the tokenizer:",Zn,ys,Gn,ws,Rl="The tokenizer returns a dictionary with three important items:",Vn,Ts,Xl='<li><a href="glossary#input-ids">input_ids</a> are the indices corresponding to each token in the sentence.</li> <li><a href="glossary#attention-mask">attention_mask</a> indicates whether a token should be attended to or not.</li> <li><a href="glossary#token-type-ids">token_type_ids</a> identifies which sequence a token belongs to when there is more than one sequence.</li>',Bn,Js,Yl="Return your input by decoding the <code>input_ids</code>:",Wn,$s,Nn,vs,Al=`As you can see, the tokenizer added two special tokens - <code>CLS</code> and <code>SEP</code> (classifier and separator) - to the sentence. Not all models need
special tokens, but if they do, the tokenizer automatically adds them for you.`,Hn,_s,Fl="If there are several sentences you want to preprocess, pass them as a list to the tokenizer:",zn,ks,qn,C,Y,tn,xs,_l,Da,El="Pad",Rn,Is,Ll="Sentences aren’t always the same length which can be an issue because tensors, the model inputs, need to have a uniform shape. Padding is a strategy for ensuring tensors are rectangular by adding a special <em>padding token</em> to shorter sentences.",Xn,Us,Ql="Set the <code>padding</code> parameter to <code>True</code> to pad the shorter sequences in the batch to match the longest sequence:",Yn,Cs,An,Zs,Pl="The first and third sentences are now padded with <code>0</code>’s because they are shorter.",Fn,Z,A,pn,Gs,kl,Ka,Sl="Truncation",En,Vs,Dl="On the other end of the spectrum, sometimes a sequence may be too long for a model to handle. In this case, you’ll need to truncate the sequence to a shorter length.",Ln,Bs,Kl="Set the <code>truncation</code> parameter to <code>True</code> to truncate a sequence to the maximum length accepted by the model:",Qn,Ws,Pn,F,Sn,G,E,rn,Ns,xl,Oa,Ol="Build tensors",Dn,Hs,st="Finally, you want the tokenizer to return the actual tensors that get fed to the model.",Kn,zs,at="Set the <code>return_tensors</code> parameter to either <code>pt</code> for PyTorch, or <code>tf</code> for TensorFlow:",On,L,se,V,Q,cn,qs,Il,sn,nt="Audio",ae,Rs,et='For audio tasks, you’ll need a <a href="main_classes/feature_extractor">feature extractor</a> to prepare your dataset for the model. The feature extractor is designed to extract features from raw audio data, and convert them into tensors.',ne,Xs,lt='Load the <a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">MInDS-14</a> dataset (see the 🤗 <a href="https://huggingface.co/docs/datasets/load_hub.html" rel="nofollow">Datasets tutorial</a> for more details on how to load a dataset) to see how you can use a feature extractor with audio datasets:',ee,Ys,le,As,tt="Access the first element of the <code>audio</code> column to take a look at the input. Calling the <code>audio</code> column automatically loads and resamples the audio file:",te,Fs,pe,Es,pt="This returns three items:",re,Ls,rt="<li><code>array</code> is the speech signal loaded - and potentially resampled - as a 1D array.</li> <li><code>path</code> points to the location of the audio file.</li> <li><code>sampling_rate</code> refers to how many data points in the speech signal are measured per second.</li>",ce,Qs,ct='For this tutorial, you’ll use the <a href="https://huggingface.co/facebook/wav2vec2-base" rel="nofollow">Wav2Vec2</a> model. Take a look at the model card, and you’ll learn Wav2Vec2 is pretrained on 16kHz sampled speech audio. It is important your audio data’s sampling rate matches the sampling rate of the dataset used to pretrain the model. If your data’s sampling rate isn’t the same, then you need to resample your data.',he,Ps,ht='<li>Use 🤗 Datasets’ <a href="https://huggingface.co/docs/datasets/v2.14.5/en/package_reference/main_classes#datasets.Dataset.cast_column" rel="nofollow">cast_column</a> method to upsample the sampling rate to 16kHz:</li>',me,Ss,ue,P,mt="<li>Call the <code>audio</code> column again to resample the audio file:</li>",oe,Ds,ie,Ks,ut="Next, load a feature extractor to normalize and pad the input. When padding textual data, a <code>0</code> is added for shorter sequences. The same idea applies to audio data. The feature extractor adds a <code>0</code> - interpreted as silence - to <code>array</code>.",je,Os,ot='Load the feature extractor with <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoFeatureExtractor.from_pretrained">AutoFeatureExtractor.from_pretrained()</a>:',be,sa,de,aa,it="Pass the audio <code>array</code> to the feature extractor. We also recommend adding the <code>sampling_rate</code> argument in the feature extractor in order to better debug any silent errors that may occur.",fe,na,ge,ea,jt="Just like the tokenizer, you can apply padding or truncation to handle variable sequences in a batch. Take a look at the sequence length of these two audio samples:",Me,la,ye,ta,bt="Create a function to preprocess the dataset so the audio samples are the same lengths. Specify a maximum sample length, and the feature extractor will either pad or truncate the sequences to match it:",we,pa,Te,ra,dt="Apply the <code>preprocess_function</code> to the the first few examples in the dataset:",Je,ca,$e,ha,ft="The sample lengths are now the same and match the specified maximum length. You can pass your processed dataset to the model now!",ve,ma,_e,B,S,hn,ua,Ul,an,gt="Computer vision",ke,oa,Mt=`For computer vision tasks, you’ll need an <a href="main_classes/image_processor">image processor</a> to prepare your dataset for the model.
Image preprocessing consists of several steps that convert images into the input expected by the model. These steps
include but are not limited to resizing, normalizing, color channel correction, and converting images to tensors.`,xe,D,Ie,ia,yt='Load the <a href="https://huggingface.co/datasets/food101" rel="nofollow">food101</a> dataset (see the 🤗 <a href="https://huggingface.co/docs/datasets/load_hub.html" rel="nofollow">Datasets tutorial</a> for more details on how to load a dataset) to see how you can use an image processor with computer vision datasets:',Ue,K,Ce,ja,Ze,ba,wt='Next, take a look at the image with 🤗 Datasets <a href="https://huggingface.co/docs/datasets/package_reference/main_classes.html?highlight=image#datasets.Image" rel="nofollow"><code>Image</code></a> feature:',Ge,da,Ve,O,Tt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/vision-preprocess-tutorial.png"/>',Be,fa,Jt='Load the image processor with <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor.from_pretrained">AutoImageProcessor.from_pretrained()</a>:',We,ga,Ne,Ma,$t='First, let’s add some image augmentation. You can use any library you prefer, but in this tutorial, we’ll use torchvision’s <a href="https://pytorch.org/vision/stable/transforms.html" rel="nofollow"><code>transforms</code></a> module. If you’re interested in using another data augmentation library, learn how in the <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification_albumentations.ipynb" rel="nofollow">Albumentations</a> or <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification_kornia.ipynb" rel="nofollow">Kornia notebooks</a>.',He,ya,vt=`<li>Here we use <a href="https://pytorch.org/vision/master/generated/torchvision.transforms.Compose.html" rel="nofollow"><code>Compose</code></a> to chain together a couple of
transforms - <a href="https://pytorch.org/vision/main/generated/torchvision.transforms.RandomResizedCrop.html" rel="nofollow"><code>RandomResizedCrop</code></a> and <a href="https://pytorch.org/vision/main/generated/torchvision.transforms.ColorJitter.html" rel="nofollow"><code>ColorJitter</code></a>.
Note that for resizing, we can get the image size requirements from the <code>image_processor</code>. For some models, an exact height and
width are expected, for others only the <code>shortest_edge</code> is defined.</li>`,ze,wa,qe,ss,_t=`<li>The model accepts <a href="model_doc/visionencoderdecoder#transformers.VisionEncoderDecoderModel.forward.pixel_values"><code>pixel_values</code></a>
as its input. <code>ImageProcessor</code> can take care of normalizing the images, and generating appropriate tensors.
Create a function that combines image augmentation and image preprocessing for a batch of images and generates <code>pixel_values</code>:</li>`,Re,Ta,Xe,as,Ye,ns,kt='<li>Then use 🤗 Datasets <a href="https://huggingface.co/docs/datasets/process.html#format-transform" rel="nofollow"><code>set_transform</code></a> to apply the transforms on the fly:</li>',Ae,Ja,Fe,es,xt="<li>Now when you access the image, you’ll notice the image processor has added <code>pixel_values</code>. You can pass your processed dataset to the model now!</li>",Ee,$a,Le,va,It="Here is what the image looks like after the transforms are applied. The image has been randomly cropped and it’s color properties are different.",Qe,_a,Pe,ls,Ut='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/preprocessed_image.png"/>',Se,ts,De,W,ps,mn,ka,Cl,nn,Ct="Pad",Ke,xa,Zt=`In some cases, for instance, when fine-tuning <a href="./model_doc/detr">DETR</a>, the model applies scale augmentation at training
time. This may cause images to be different sizes in a batch. You can use <code>DetrImageProcessor.pad()</code>
from <a href="/docs/transformers/v4.34.0/en/model_doc/detr#transformers.DetrImageProcessor">DetrImageProcessor</a> and define a custom <code>collate_fn</code> to batch images together.`,Oe,Ia,sl,N,rs,un,Ua,Zl,en,Gt="Multimodal",al,Ca,Vt='For tasks involving multimodal inputs, you’ll need a <a href="main_classes/processors">processor</a> to prepare your dataset for the model. A processor couples together two processing objects such as as tokenizer and feature extractor.',nl,Za,Bt='Load the <a href="https://huggingface.co/datasets/lj_speech" rel="nofollow">LJ Speech</a> dataset (see the 🤗 <a href="https://huggingface.co/docs/datasets/load_hub.html" rel="nofollow">Datasets tutorial</a> for more details on how to load a dataset) to see how you can use a processor for automatic speech recognition (ASR):',el,Ga,ll,Va,Wt="For ASR, you’re mainly focused on <code>audio</code> and <code>text</code> so you can remove the other columns:",tl,Ba,pl,Wa,Nt="Now take a look at the <code>audio</code> and <code>text</code> columns:",rl,Na,cl,Ha,Ht='Remember you should always <a href="preprocessing#audio">resample</a> your audio dataset’s sampling rate to match the sampling rate of the dataset used to pretrain a model!',hl,za,ml,qa,zt='Load a processor with <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoProcessor.from_pretrained">AutoProcessor.from_pretrained()</a>:',ul,Ra,ol,Xa,qt="<li>Create a function to process the audio data contained in <code>array</code> to <code>input_values</code>, and tokenize <code>text</code> to <code>labels</code>. These are the inputs to the model:</li>",il,Ya,jl,cs,Rt="<li>Apply the <code>prepare_dataset</code> function to a sample:</li>",bl,Aa,dl,Fa,Xt="The processor has now added <code>input_values</code> and <code>labels</code>, and the sampling rate has also been correctly downsampled to 16kHz. You can pass your processed dataset to the model now!",fl,on,gl;return I=new H({}),hs=new hp({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/preprocessing.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/pytorch/preprocessing.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/tensorflow/preprocessing.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/preprocessing.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/pytorch/preprocessing.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/tensorflow/preprocessing.ipynb"}]}}),q=new Pa({props:{$$slots:{default:[up]},$$scope:{ctx:J}}}),is=new w({props:{code:"cGlwJTIwaW5zdGFsbCUyMGRhdGFzZXRz",highlighted:"pip install datasets",wrap:!1}}),js=new H({}),bs=new cp({props:{id:"Yffk5aydLzg"}}),X=new Pa({props:{$$slots:{default:[op]},$$scope:{ctx:J}}}),gs=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtY2FzZWQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-cased&quot;</span>)`,wrap:!1}}),ys=new w({props:{code:"ZW5jb2RlZF9pbnB1dCUyMCUzRCUyMHRva2VuaXplciglMjJEbyUyMG5vdCUyMG1lZGRsZSUyMGluJTIwdGhlJTIwYWZmYWlycyUyMG9mJTIwd2l6YXJkcyUyQyUyMGZvciUyMHRoZXklMjBhcmUlMjBzdWJ0bGUlMjBhbmQlMjBxdWljayUyMHRvJTIwYW5nZXIuJTIyKSUwQXByaW50KGVuY29kZWRfaW5wdXQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_input = tokenizer(<span class="hljs-string">&quot;Do not meddle in the affairs of wizards, for they are subtle and quick to anger.&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoded_input)
{<span class="hljs-string">&#x27;input_ids&#x27;</span>: [<span class="hljs-number">101</span>, <span class="hljs-number">2079</span>, <span class="hljs-number">2025</span>, <span class="hljs-number">19960</span>, <span class="hljs-number">10362</span>, <span class="hljs-number">1999</span>, <span class="hljs-number">1996</span>, <span class="hljs-number">3821</span>, <span class="hljs-number">1997</span>, <span class="hljs-number">16657</span>, <span class="hljs-number">1010</span>, <span class="hljs-number">2005</span>, <span class="hljs-number">2027</span>, <span class="hljs-number">2024</span>, <span class="hljs-number">11259</span>, <span class="hljs-number">1998</span>, <span class="hljs-number">4248</span>, <span class="hljs-number">2000</span>, <span class="hljs-number">4963</span>, <span class="hljs-number">1012</span>, <span class="hljs-number">102</span>],
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
 <span class="hljs-string">&#x27;attention_mask&#x27;</span>: [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]}`,wrap:!1}}),$s=new w({props:{code:"dG9rZW5pemVyLmRlY29kZShlbmNvZGVkX2lucHV0JTVCJTIyaW5wdXRfaWRzJTIyJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(encoded_input[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-string">&#x27;[CLS] Do not meddle in the affairs of wizards, for they are subtle and quick to anger. [SEP]&#x27;</span>`,wrap:!1}}),ks=new w({props:{code:"YmF0Y2hfc2VudGVuY2VzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIyQnV0JTIwd2hhdCUyMGFib3V0JTIwc2Vjb25kJTIwYnJlYWtmYXN0JTNGJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyRG9uJ3QlMjB0aGluayUyMGhlJTIwa25vd3MlMjBhYm91dCUyMHNlY29uZCUyMGJyZWFrZmFzdCUyQyUyMFBpcC4lMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJXaGF0JTIwYWJvdXQlMjBlbGV2ZW5zaWVzJTNGJTIyJTJDJTBBJTVEJTBBZW5jb2RlZF9pbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoYmF0Y2hfc2VudGVuY2VzKSUwQXByaW50KGVuY29kZWRfaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>batch_sentences = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;But what about second breakfast?&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Don&#x27;t think he knows about second breakfast, Pip.&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;What about elevensies?&quot;</span>,
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_inputs = tokenizer(batch_sentences)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoded_inputs)
{<span class="hljs-string">&#x27;input_ids&#x27;</span>: [[<span class="hljs-number">101</span>, <span class="hljs-number">1252</span>, <span class="hljs-number">1184</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">1248</span>, <span class="hljs-number">6462</span>, <span class="hljs-number">136</span>, <span class="hljs-number">102</span>],
               [<span class="hljs-number">101</span>, <span class="hljs-number">1790</span>, <span class="hljs-number">112</span>, <span class="hljs-number">189</span>, <span class="hljs-number">1341</span>, <span class="hljs-number">1119</span>, <span class="hljs-number">3520</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">1248</span>, <span class="hljs-number">6462</span>, <span class="hljs-number">117</span>, <span class="hljs-number">21902</span>, <span class="hljs-number">1643</span>, <span class="hljs-number">119</span>, <span class="hljs-number">102</span>],
               [<span class="hljs-number">101</span>, <span class="hljs-number">1327</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">5450</span>, <span class="hljs-number">23434</span>, <span class="hljs-number">136</span>, <span class="hljs-number">102</span>]],
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: [[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
                    [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
                    [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]],
 <span class="hljs-string">&#x27;attention_mask&#x27;</span>: [[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
                    [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
                    [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]]}`,wrap:!1}}),xs=new H({}),Cs=new w({props:{code:"YmF0Y2hfc2VudGVuY2VzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIyQnV0JTIwd2hhdCUyMGFib3V0JTIwc2Vjb25kJTIwYnJlYWtmYXN0JTNGJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyRG9uJ3QlMjB0aGluayUyMGhlJTIwa25vd3MlMjBhYm91dCUyMHNlY29uZCUyMGJyZWFrZmFzdCUyQyUyMFBpcC4lMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJXaGF0JTIwYWJvdXQlMjBlbGV2ZW5zaWVzJTNGJTIyJTJDJTBBJTVEJTBBZW5jb2RlZF9pbnB1dCUyMCUzRCUyMHRva2VuaXplcihiYXRjaF9zZW50ZW5jZXMlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEFwcmludChlbmNvZGVkX2lucHV0KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>batch_sentences = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;But what about second breakfast?&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Don&#x27;t think he knows about second breakfast, Pip.&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;What about elevensies?&quot;</span>,
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_input = tokenizer(batch_sentences, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoded_input)
{<span class="hljs-string">&#x27;input_ids&#x27;</span>: [[<span class="hljs-number">101</span>, <span class="hljs-number">1252</span>, <span class="hljs-number">1184</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">1248</span>, <span class="hljs-number">6462</span>, <span class="hljs-number">136</span>, <span class="hljs-number">102</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
               [<span class="hljs-number">101</span>, <span class="hljs-number">1790</span>, <span class="hljs-number">112</span>, <span class="hljs-number">189</span>, <span class="hljs-number">1341</span>, <span class="hljs-number">1119</span>, <span class="hljs-number">3520</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">1248</span>, <span class="hljs-number">6462</span>, <span class="hljs-number">117</span>, <span class="hljs-number">21902</span>, <span class="hljs-number">1643</span>, <span class="hljs-number">119</span>, <span class="hljs-number">102</span>],
               [<span class="hljs-number">101</span>, <span class="hljs-number">1327</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">5450</span>, <span class="hljs-number">23434</span>, <span class="hljs-number">136</span>, <span class="hljs-number">102</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]],
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: [[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
                    [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
                    [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]],
 <span class="hljs-string">&#x27;attention_mask&#x27;</span>: [[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
                    [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
                    [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]]}`,wrap:!1}}),Gs=new H({}),Ws=new w({props:{code:"YmF0Y2hfc2VudGVuY2VzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIyQnV0JTIwd2hhdCUyMGFib3V0JTIwc2Vjb25kJTIwYnJlYWtmYXN0JTNGJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyRG9uJ3QlMjB0aGluayUyMGhlJTIwa25vd3MlMjBhYm91dCUyMHNlY29uZCUyMGJyZWFrZmFzdCUyQyUyMFBpcC4lMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJXaGF0JTIwYWJvdXQlMjBlbGV2ZW5zaWVzJTNGJTIyJTJDJTBBJTVEJTBBZW5jb2RlZF9pbnB1dCUyMCUzRCUyMHRva2VuaXplcihiYXRjaF9zZW50ZW5jZXMlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHRydW5jYXRpb24lM0RUcnVlKSUwQXByaW50KGVuY29kZWRfaW5wdXQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>batch_sentences = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;But what about second breakfast?&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;Don&#x27;t think he knows about second breakfast, Pip.&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;What about elevensies?&quot;</span>,
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_input = tokenizer(batch_sentences, padding=<span class="hljs-literal">True</span>, truncation=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoded_input)
{<span class="hljs-string">&#x27;input_ids&#x27;</span>: [[<span class="hljs-number">101</span>, <span class="hljs-number">1252</span>, <span class="hljs-number">1184</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">1248</span>, <span class="hljs-number">6462</span>, <span class="hljs-number">136</span>, <span class="hljs-number">102</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
               [<span class="hljs-number">101</span>, <span class="hljs-number">1790</span>, <span class="hljs-number">112</span>, <span class="hljs-number">189</span>, <span class="hljs-number">1341</span>, <span class="hljs-number">1119</span>, <span class="hljs-number">3520</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">1248</span>, <span class="hljs-number">6462</span>, <span class="hljs-number">117</span>, <span class="hljs-number">21902</span>, <span class="hljs-number">1643</span>, <span class="hljs-number">119</span>, <span class="hljs-number">102</span>],
               [<span class="hljs-number">101</span>, <span class="hljs-number">1327</span>, <span class="hljs-number">1164</span>, <span class="hljs-number">5450</span>, <span class="hljs-number">23434</span>, <span class="hljs-number">136</span>, <span class="hljs-number">102</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]],
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: [[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
                    [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
                    [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]],
 <span class="hljs-string">&#x27;attention_mask&#x27;</span>: [[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
                    [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
                    [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]]}`,wrap:!1}}),F=new Pa({props:{$$slots:{default:[ip]},$$scope:{ctx:J}}}),Ns=new H({}),L=new mp({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[fp],pytorch:[bp]},$$scope:{ctx:J}}}),qs=new H({}),Ys=new w({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMlBvbHlBSSUyRm1pbmRzMTQlMjIlMkMlMjBuYW1lJTNEJTIyZW4tVVMlMjIlMkMlMjBzcGxpdCUzRCUyMnRyYWluJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;PolyAI/minds14&quot;</span>, name=<span class="hljs-string">&quot;en-US&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)`,wrap:!1}}),Fs=new w({props:{code:"ZGF0YXNldCU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>]
{<span class="hljs-string">&#x27;array&#x27;</span>: array([ <span class="hljs-number">0.</span>        ,  <span class="hljs-number">0.00024414</span>, -<span class="hljs-number">0.00024414</span>, ..., -<span class="hljs-number">0.00024414</span>,
         <span class="hljs-number">0.</span>        ,  <span class="hljs-number">0.</span>        ], dtype=float32),
 <span class="hljs-string">&#x27;path&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav&#x27;</span>,
 <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">8000</span>}`,wrap:!1}}),Ss=new w({props:{code:"ZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQuY2FzdF9jb2x1bW4oJTIyYXVkaW8lMjIlMkMlMjBBdWRpbyhzYW1wbGluZ19yYXRlJTNEMTZfMDAwKSk=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16_000</span>))',wrap:!1}}),Ds=new w({props:{code:"ZGF0YXNldCU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>]
{<span class="hljs-string">&#x27;array&#x27;</span>: array([ <span class="hljs-number">2.3443763e-05</span>,  <span class="hljs-number">2.1729663e-04</span>,  <span class="hljs-number">2.2145823e-04</span>, ...,
         <span class="hljs-number">3.8356509e-05</span>, -<span class="hljs-number">7.3497440e-06</span>, -<span class="hljs-number">2.1754686e-05</span>], dtype=float32),
 <span class="hljs-string">&#x27;path&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav&#x27;</span>,
 <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">16000</span>}`,wrap:!1}}),sa=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ3YXYydmVjMi1iYXNlJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-base&quot;</span>)`,wrap:!1}}),na=new w({props:{code:"YXVkaW9faW5wdXQlMjAlM0QlMjAlNUJkYXRhc2V0JTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyYXJyYXklMjIlNUQlNUQlMEFmZWF0dXJlX2V4dHJhY3RvcihhdWRpb19pbnB1dCUyQyUyMHNhbXBsaW5nX3JhdGUlM0QxNjAwMCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>audio_input = [dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>]]
<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor(audio_input, sampling_rate=<span class="hljs-number">16000</span>)
{<span class="hljs-string">&#x27;input_values&#x27;</span>: [array([ <span class="hljs-number">3.8106556e-04</span>,  <span class="hljs-number">2.7506407e-03</span>,  <span class="hljs-number">2.8015103e-03</span>, ...,
        <span class="hljs-number">5.6335266e-04</span>,  <span class="hljs-number">4.6588284e-06</span>, -<span class="hljs-number">1.7142107e-04</span>], dtype=float32)]}`,wrap:!1}}),la=new w({props:{code:"ZGF0YXNldCU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVELnNoYXBlJTBBJTBBZGF0YXNldCU1QjElNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVELnNoYXBl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>].shape
(<span class="hljs-number">173398</span>,)

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-number">1</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>].shape
(<span class="hljs-number">106496</span>,)`,wrap:!1}}),pa=new w({props:{code:"ZGVmJTIwcHJlcHJvY2Vzc19mdW5jdGlvbihleGFtcGxlcyklM0ElMEElMjAlMjAlMjAlMjBhdWRpb19hcnJheXMlMjAlM0QlMjAlNUJ4JTVCJTIyYXJyYXklMjIlNUQlMjBmb3IlMjB4JTIwaW4lMjBleGFtcGxlcyU1QiUyMmF1ZGlvJTIyJTVEJTVEJTBBJTIwJTIwJTIwJTIwaW5wdXRzJTIwJTNEJTIwZmVhdHVyZV9leHRyYWN0b3IoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYXVkaW9fYXJyYXlzJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwc2FtcGxpbmdfcmF0ZSUzRDE2MDAwJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcGFkZGluZyUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBtYXhfbGVuZ3RoJTNEMTAwMDAwJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwdHJ1bmNhdGlvbiUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjApJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwaW5wdXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_function</span>(<span class="hljs-params">examples</span>):
<span class="hljs-meta">... </span>    audio_arrays = [x[<span class="hljs-string">&quot;array&quot;</span>] <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> examples[<span class="hljs-string">&quot;audio&quot;</span>]]
<span class="hljs-meta">... </span>    inputs = feature_extractor(
<span class="hljs-meta">... </span>        audio_arrays,
<span class="hljs-meta">... </span>        sampling_rate=<span class="hljs-number">16000</span>,
<span class="hljs-meta">... </span>        padding=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>        max_length=<span class="hljs-number">100000</span>,
<span class="hljs-meta">... </span>        truncation=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    )
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> inputs`,wrap:!1}}),ca=new w({props:{code:"cHJvY2Vzc2VkX2RhdGFzZXQlMjAlM0QlMjBwcmVwcm9jZXNzX2Z1bmN0aW9uKGRhdGFzZXQlNUIlM0E1JTVEKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>processed_dataset = preprocess_function(dataset[:<span class="hljs-number">5</span>])',wrap:!1}}),ma=new w({props:{code:"cHJvY2Vzc2VkX2RhdGFzZXQlNUIlMjJpbnB1dF92YWx1ZXMlMjIlNUQlNUIwJTVELnNoYXBlJTBBJTBBcHJvY2Vzc2VkX2RhdGFzZXQlNUIlMjJpbnB1dF92YWx1ZXMlMjIlNUQlNUIxJTVELnNoYXBl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>processed_dataset[<span class="hljs-string">&quot;input_values&quot;</span>][<span class="hljs-number">0</span>].shape
(<span class="hljs-number">100000</span>,)

<span class="hljs-meta">&gt;&gt;&gt; </span>processed_dataset[<span class="hljs-string">&quot;input_values&quot;</span>][<span class="hljs-number">1</span>].shape
(<span class="hljs-number">100000</span>,)`,wrap:!1}}),ua=new H({}),D=new Pa({props:{$$slots:{default:[gp]},$$scope:{ctx:J}}}),K=new Pa({props:{$$slots:{default:[Mp]},$$scope:{ctx:J}}}),ja=new w({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJmb29kMTAxJTIyJTJDJTIwc3BsaXQlM0QlMjJ0cmFpbiU1QiUzQTEwMCU1RCUyMik=",highlighted:`<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;food101&quot;</span>, split=<span class="hljs-string">&quot;train[:100]&quot;</span>)`,wrap:!1}}),da=new w({props:{code:"ZGF0YXNldCU1QjAlNUQlNUIlMjJpbWFnZSUyMiU1RA==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;image&quot;</span>]',wrap:!1}}),ga=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdml0LWJhc2UtcGF0Y2gxNi0yMjQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;google/vit-base-patch16-224&quot;</span>)`,wrap:!1}}),wa=new w({props:{code:"ZnJvbSUyMHRvcmNodmlzaW9uLnRyYW5zZm9ybXMlMjBpbXBvcnQlMjBSYW5kb21SZXNpemVkQ3JvcCUyQyUyMENvbG9ySml0dGVyJTJDJTIwQ29tcG9zZSUwQSUwQXNpemUlMjAlM0QlMjAoJTBBJTIwJTIwJTIwJTIwaW1hZ2VfcHJvY2Vzc29yLnNpemUlNUIlMjJzaG9ydGVzdF9lZGdlJTIyJTVEJTBBJTIwJTIwJTIwJTIwaWYlMjAlMjJzaG9ydGVzdF9lZGdlJTIyJTIwaW4lMjBpbWFnZV9wcm9jZXNzb3Iuc2l6ZSUwQSUyMCUyMCUyMCUyMGVsc2UlMjAoaW1hZ2VfcHJvY2Vzc29yLnNpemUlNUIlMjJoZWlnaHQlMjIlNUQlMkMlMjBpbWFnZV9wcm9jZXNzb3Iuc2l6ZSU1QiUyMndpZHRoJTIyJTVEKSUwQSklMEElMEFfdHJhbnNmb3JtcyUyMCUzRCUyMENvbXBvc2UoJTVCUmFuZG9tUmVzaXplZENyb3Aoc2l6ZSklMkMlMjBDb2xvckppdHRlcihicmlnaHRuZXNzJTNEMC41JTJDJTIwaHVlJTNEMC41KSU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> torchvision.transforms <span class="hljs-keyword">import</span> RandomResizedCrop, ColorJitter, Compose

<span class="hljs-meta">&gt;&gt;&gt; </span>size = (
<span class="hljs-meta">... </span>    image_processor.size[<span class="hljs-string">&quot;shortest_edge&quot;</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">if</span> <span class="hljs-string">&quot;shortest_edge&quot;</span> <span class="hljs-keyword">in</span> image_processor.size
<span class="hljs-meta">... </span>    <span class="hljs-keyword">else</span> (image_processor.size[<span class="hljs-string">&quot;height&quot;</span>], image_processor.size[<span class="hljs-string">&quot;width&quot;</span>])
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>_transforms = Compose([RandomResizedCrop(size), ColorJitter(brightness=<span class="hljs-number">0.5</span>, hue=<span class="hljs-number">0.5</span>)])`,wrap:!1}}),Ta=new w({props:{code:"ZGVmJTIwdHJhbnNmb3JtcyhleGFtcGxlcyklM0ElMEElMjAlMjAlMjAlMjBpbWFnZXMlMjAlM0QlMjAlNUJfdHJhbnNmb3JtcyhpbWcuY29udmVydCglMjJSR0IlMjIpKSUyMGZvciUyMGltZyUyMGluJTIwZXhhbXBsZXMlNUIlMjJpbWFnZSUyMiU1RCU1RCUwQSUyMCUyMCUyMCUyMGV4YW1wbGVzJTVCJTIycGl4ZWxfdmFsdWVzJTIyJTVEJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUyQyUyMGRvX3Jlc2l6ZSUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklNUIlMjJwaXhlbF92YWx1ZXMlMjIlNUQlMEElMjAlMjAlMjAlMjByZXR1cm4lMjBleGFtcGxlcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">transforms</span>(<span class="hljs-params">examples</span>):
<span class="hljs-meta">... </span>    images = [_transforms(img.convert(<span class="hljs-string">&quot;RGB&quot;</span>)) <span class="hljs-keyword">for</span> img <span class="hljs-keyword">in</span> examples[<span class="hljs-string">&quot;image&quot;</span>]]
<span class="hljs-meta">... </span>    examples[<span class="hljs-string">&quot;pixel_values&quot;</span>] = image_processor(images, do_resize=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)[<span class="hljs-string">&quot;pixel_values&quot;</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> examples`,wrap:!1}}),as=new Pa({props:{$$slots:{default:[yp]},$$scope:{ctx:J}}}),Ja=new w({props:{code:"ZGF0YXNldC5zZXRfdHJhbnNmb3JtKHRyYW5zZm9ybXMp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset.set_transform(transforms)',wrap:!1}}),$a=new w({props:{code:"ZGF0YXNldCU1QjAlNUQua2V5cygp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-number">0</span>].keys()',wrap:!1}}),_a=new w({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBaW1wb3J0JTIwbWF0cGxvdGxpYi5weXBsb3QlMjBhcyUyMHBsdCUwQSUwQWltZyUyMCUzRCUyMGRhdGFzZXQlNUIwJTVEJTVCJTIycGl4ZWxfdmFsdWVzJTIyJTVEJTBBcGx0Lmltc2hvdyhpbWcucGVybXV0ZSgxJTJDJTIwMiUyQyUyMDApKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> matplotlib.pyplot <span class="hljs-keyword">as</span> plt

<span class="hljs-meta">&gt;&gt;&gt; </span>img = dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;pixel_values&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>plt.imshow(img.permute(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">0</span>))`,wrap:!1}}),ts=new Pa({props:{$$slots:{default:[wp]},$$scope:{ctx:J}}}),ka=new H({}),Ia=new w({props:{code:"ZGVmJTIwY29sbGF0ZV9mbihiYXRjaCklM0ElMEElMjAlMjAlMjAlMjBwaXhlbF92YWx1ZXMlMjAlM0QlMjAlNUJpdGVtJTVCJTIycGl4ZWxfdmFsdWVzJTIyJTVEJTIwZm9yJTIwaXRlbSUyMGluJTIwYmF0Y2glNUQlMEElMjAlMjAlMjAlMjBlbmNvZGluZyUyMCUzRCUyMGltYWdlX3Byb2Nlc3Nvci5wYWQocGl4ZWxfdmFsdWVzJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMjAlMjAlMjAlMjBsYWJlbHMlMjAlM0QlMjAlNUJpdGVtJTVCJTIybGFiZWxzJTIyJTVEJTIwZm9yJTIwaXRlbSUyMGluJTIwYmF0Y2glNUQlMEElMjAlMjAlMjAlMjBiYXRjaCUyMCUzRCUyMCU3QiU3RCUwQSUyMCUyMCUyMCUyMGJhdGNoJTVCJTIycGl4ZWxfdmFsdWVzJTIyJTVEJTIwJTNEJTIwZW5jb2RpbmclNUIlMjJwaXhlbF92YWx1ZXMlMjIlNUQlMEElMjAlMjAlMjAlMjBiYXRjaCU1QiUyMnBpeGVsX21hc2slMjIlNUQlMjAlM0QlMjBlbmNvZGluZyU1QiUyMnBpeGVsX21hc2slMjIlNUQlMEElMjAlMjAlMjAlMjBiYXRjaCU1QiUyMmxhYmVscyUyMiU1RCUyMCUzRCUyMGxhYmVscyUwQSUyMCUyMCUyMCUyMHJldHVybiUyMGJhdGNo",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">collate_fn</span>(<span class="hljs-params">batch</span>):
<span class="hljs-meta">... </span>    pixel_values = [item[<span class="hljs-string">&quot;pixel_values&quot;</span>] <span class="hljs-keyword">for</span> item <span class="hljs-keyword">in</span> batch]
<span class="hljs-meta">... </span>    encoding = image_processor.pad(pixel_values, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">... </span>    labels = [item[<span class="hljs-string">&quot;labels&quot;</span>] <span class="hljs-keyword">for</span> item <span class="hljs-keyword">in</span> batch]
<span class="hljs-meta">... </span>    batch = {}
<span class="hljs-meta">... </span>    batch[<span class="hljs-string">&quot;pixel_values&quot;</span>] = encoding[<span class="hljs-string">&quot;pixel_values&quot;</span>]
<span class="hljs-meta">... </span>    batch[<span class="hljs-string">&quot;pixel_mask&quot;</span>] = encoding[<span class="hljs-string">&quot;pixel_mask&quot;</span>]
<span class="hljs-meta">... </span>    batch[<span class="hljs-string">&quot;labels&quot;</span>] = labels
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> batch`,wrap:!1}}),Ua=new H({}),Ga=new w({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBbGpfc3BlZWNoJTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmxqX3NwZWVjaCUyMiUyQyUyMHNwbGl0JTNEJTIydHJhaW4lMjIp",highlighted:`<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>lj_speech = load_dataset(<span class="hljs-string">&quot;lj_speech&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)`,wrap:!1}}),Ba=new w({props:{code:"bGpfc3BlZWNoJTIwJTNEJTIwbGpfc3BlZWNoLm1hcChyZW1vdmVfY29sdW1ucyUzRCU1QiUyMmZpbGUlMjIlMkMlMjAlMjJpZCUyMiUyQyUyMCUyMm5vcm1hbGl6ZWRfdGV4dCUyMiU1RCk=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>lj_speech = lj_speech.<span class="hljs-built_in">map</span>(remove_columns=[<span class="hljs-string">&quot;file&quot;</span>, <span class="hljs-string">&quot;id&quot;</span>, <span class="hljs-string">&quot;normalized_text&quot;</span>])',wrap:!1}}),Na=new w({props:{code:"bGpfc3BlZWNoJTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTBBJTBBbGpfc3BlZWNoJTVCMCU1RCU1QiUyMnRleHQlMjIlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>lj_speech[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>]
{<span class="hljs-string">&#x27;array&#x27;</span>: array([-<span class="hljs-number">7.3242188e-04</span>, -<span class="hljs-number">7.6293945e-04</span>, -<span class="hljs-number">6.4086914e-04</span>, ...,
         <span class="hljs-number">7.3242188e-04</span>,  <span class="hljs-number">2.1362305e-04</span>,  <span class="hljs-number">6.1035156e-05</span>], dtype=float32),
 <span class="hljs-string">&#x27;path&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/downloads/extracted/917ece08c95cf0c4115e45294e3cd0dee724a1165b7fc11798369308a465bd26/LJSpeech-1.1/wavs/LJ001-0001.wav&#x27;</span>,
 <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">22050</span>}

<span class="hljs-meta">&gt;&gt;&gt; </span>lj_speech[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;text&quot;</span>]
<span class="hljs-string">&#x27;Printing, in the only sense with which we are at present concerned, differs from most if not from all the arts and crafts represented in the Exhibition&#x27;</span>`,wrap:!1}}),za=new w({props:{code:"bGpfc3BlZWNoJTIwJTNEJTIwbGpfc3BlZWNoLmNhc3RfY29sdW1uKCUyMmF1ZGlvJTIyJTJDJTIwQXVkaW8oc2FtcGxpbmdfcmF0ZSUzRDE2XzAwMCkp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>lj_speech = lj_speech.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16_000</span>))',wrap:!1}}),Ra=new w({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRndhdjJ2ZWMyLWJhc2UtOTYwaCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-base-960h&quot;</span>)`,wrap:!1}}),Ya=new w({props:{code:"ZGVmJTIwcHJlcGFyZV9kYXRhc2V0KGV4YW1wbGUpJTNBJTBBJTIwJTIwJTIwJTIwYXVkaW8lMjAlM0QlMjBleGFtcGxlJTVCJTIyYXVkaW8lMjIlNUQlMEElMEElMjAlMjAlMjAlMjBleGFtcGxlLnVwZGF0ZShwcm9jZXNzb3IoYXVkaW8lM0RhdWRpbyU1QiUyMmFycmF5JTIyJTVEJTJDJTIwdGV4dCUzRGV4YW1wbGUlNUIlMjJ0ZXh0JTIyJTVEJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRDE2MDAwKSklMEElMEElMjAlMjAlMjAlMjByZXR1cm4lMjBleGFtcGxl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">prepare_dataset</span>(<span class="hljs-params">example</span>):
<span class="hljs-meta">... </span>    audio = example[<span class="hljs-string">&quot;audio&quot;</span>]

<span class="hljs-meta">... </span>    example.update(processor(audio=audio[<span class="hljs-string">&quot;array&quot;</span>], text=example[<span class="hljs-string">&quot;text&quot;</span>], sampling_rate=<span class="hljs-number">16000</span>))

<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> example`,wrap:!1}}),Aa=new w({props:{code:"cHJlcGFyZV9kYXRhc2V0KGxqX3NwZWVjaCU1QjAlNUQp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>prepare_dataset(lj_speech[<span class="hljs-number">0</span>])',wrap:!1}}),{c(){c=p("meta"),f=l(),h=p("p"),M=l(),v=p("h1"),$=p("a"),_=p("span"),u(I.$$.fragment),k=l(),x=p("span"),x.textContent=Gl,Mn=l(),u(hs.$$.fragment),yn=l(),ms=p("p"),ms.textContent=Vl,wn=l(),us=p("ul"),us.innerHTML=Bl,Tn=l(),u(q.$$.fragment),Jn=l(),os=p("p"),os.textContent=Wl,$n=l(),u(is.$$.fragment),vn=l(),U=p("h2"),R=p("a"),ln=p("span"),u(js.$$.fragment),vl=l(),Sa=p("span"),Sa.textContent=Nl,_n=l(),u(bs.$$.fragment),kn=l(),ds=p("p"),ds.innerHTML=Hl,xn=l(),u(X.$$.fragment),In=l(),fs=p("p"),fs.innerHTML=zl,Un=l(),u(gs.$$.fragment),Cn=l(),Ms=p("p"),Ms.textContent=ql,Zn=l(),u(ys.$$.fragment),Gn=l(),ws=p("p"),ws.textContent=Rl,Vn=l(),Ts=p("ul"),Ts.innerHTML=Xl,Bn=l(),Js=p("p"),Js.innerHTML=Yl,Wn=l(),u($s.$$.fragment),Nn=l(),vs=p("p"),vs.innerHTML=Al,Hn=l(),_s=p("p"),_s.textContent=Fl,zn=l(),u(ks.$$.fragment),qn=l(),C=p("h3"),Y=p("a"),tn=p("span"),u(xs.$$.fragment),_l=l(),Da=p("span"),Da.textContent=El,Rn=l(),Is=p("p"),Is.innerHTML=Ll,Xn=l(),Us=p("p"),Us.innerHTML=Ql,Yn=l(),u(Cs.$$.fragment),An=l(),Zs=p("p"),Zs.innerHTML=Pl,Fn=l(),Z=p("h3"),A=p("a"),pn=p("span"),u(Gs.$$.fragment),kl=l(),Ka=p("span"),Ka.textContent=Sl,En=l(),Vs=p("p"),Vs.textContent=Dl,Ln=l(),Bs=p("p"),Bs.innerHTML=Kl,Qn=l(),u(Ws.$$.fragment),Pn=l(),u(F.$$.fragment),Sn=l(),G=p("h3"),E=p("a"),rn=p("span"),u(Ns.$$.fragment),xl=l(),Oa=p("span"),Oa.textContent=Ol,Dn=l(),Hs=p("p"),Hs.textContent=st,Kn=l(),zs=p("p"),zs.innerHTML=at,On=l(),u(L.$$.fragment),se=l(),V=p("h2"),Q=p("a"),cn=p("span"),u(qs.$$.fragment),Il=l(),sn=p("span"),sn.textContent=nt,ae=l(),Rs=p("p"),Rs.innerHTML=et,ne=l(),Xs=p("p"),Xs.innerHTML=lt,ee=l(),u(Ys.$$.fragment),le=l(),As=p("p"),As.innerHTML=tt,te=l(),u(Fs.$$.fragment),pe=l(),Es=p("p"),Es.textContent=pt,re=l(),Ls=p("ul"),Ls.innerHTML=rt,ce=l(),Qs=p("p"),Qs.innerHTML=ct,he=l(),Ps=p("ol"),Ps.innerHTML=ht,me=l(),u(Ss.$$.fragment),ue=l(),P=p("ol"),P.innerHTML=mt,oe=l(),u(Ds.$$.fragment),ie=l(),Ks=p("p"),Ks.innerHTML=ut,je=l(),Os=p("p"),Os.innerHTML=ot,be=l(),u(sa.$$.fragment),de=l(),aa=p("p"),aa.innerHTML=it,fe=l(),u(na.$$.fragment),ge=l(),ea=p("p"),ea.textContent=jt,Me=l(),u(la.$$.fragment),ye=l(),ta=p("p"),ta.textContent=bt,we=l(),u(pa.$$.fragment),Te=l(),ra=p("p"),ra.innerHTML=dt,Je=l(),u(ca.$$.fragment),$e=l(),ha=p("p"),ha.textContent=ft,ve=l(),u(ma.$$.fragment),_e=l(),B=p("h2"),S=p("a"),hn=p("span"),u(ua.$$.fragment),Ul=l(),an=p("span"),an.textContent=gt,ke=l(),oa=p("p"),oa.innerHTML=Mt,xe=l(),u(D.$$.fragment),Ie=l(),ia=p("p"),ia.innerHTML=yt,Ue=l(),u(K.$$.fragment),Ce=l(),u(ja.$$.fragment),Ze=l(),ba=p("p"),ba.innerHTML=wt,Ge=l(),u(da.$$.fragment),Ve=l(),O=p("div"),O.innerHTML=Tt,Be=l(),fa=p("p"),fa.innerHTML=Jt,We=l(),u(ga.$$.fragment),Ne=l(),Ma=p("p"),Ma.innerHTML=$t,He=l(),ya=p("ol"),ya.innerHTML=vt,ze=l(),u(wa.$$.fragment),qe=l(),ss=p("ol"),ss.innerHTML=_t,Re=l(),u(Ta.$$.fragment),Xe=l(),u(as.$$.fragment),Ye=l(),ns=p("ol"),ns.innerHTML=kt,Ae=l(),u(Ja.$$.fragment),Fe=l(),es=p("ol"),es.innerHTML=xt,Ee=l(),u($a.$$.fragment),Le=l(),va=p("p"),va.textContent=It,Qe=l(),u(_a.$$.fragment),Pe=l(),ls=p("div"),ls.innerHTML=Ut,Se=l(),u(ts.$$.fragment),De=l(),W=p("h3"),ps=p("a"),mn=p("span"),u(ka.$$.fragment),Cl=l(),nn=p("span"),nn.textContent=Ct,Ke=l(),xa=p("p"),xa.innerHTML=Zt,Oe=l(),u(Ia.$$.fragment),sl=l(),N=p("h2"),rs=p("a"),un=p("span"),u(Ua.$$.fragment),Zl=l(),en=p("span"),en.textContent=Gt,al=l(),Ca=p("p"),Ca.innerHTML=Vt,nl=l(),Za=p("p"),Za.innerHTML=Bt,el=l(),u(Ga.$$.fragment),ll=l(),Va=p("p"),Va.innerHTML=Wt,tl=l(),u(Ba.$$.fragment),pl=l(),Wa=p("p"),Wa.innerHTML=Nt,rl=l(),u(Na.$$.fragment),cl=l(),Ha=p("p"),Ha.innerHTML=Ht,hl=l(),u(za.$$.fragment),ml=l(),qa=p("p"),qa.innerHTML=zt,ul=l(),u(Ra.$$.fragment),ol=l(),Xa=p("ol"),Xa.innerHTML=qt,il=l(),u(Ya.$$.fragment),jl=l(),cs=p("ol"),cs.innerHTML=Rt,bl=l(),u(Aa.$$.fragment),dl=l(),Fa=p("p"),Fa.innerHTML=Xt,fl=l(),on=p("p"),this.h()},l(s){const a=rp("svelte-1phssyn",document.head);c=r(a,"META",{name:!0,content:!0}),a.forEach(n),f=t(s),h=r(s,"P",{}),T(h).forEach(n),M=t(s),v=r(s,"H1",{class:!0});var Ea=T(v);$=r(Ea,"A",{id:!0,class:!0,href:!0});var jn=T($);_=r(jn,"SPAN",{});var bn=T(_);o(I.$$.fragment,bn),bn.forEach(n),jn.forEach(n),k=t(Ea),x=r(Ea,"SPAN",{"data-svelte-h":!0}),m(x)!=="svelte-1cg9qj"&&(x.textContent=Gl),Ea.forEach(n),Mn=t(s),o(hs.$$.fragment,s),yn=t(s),ms=r(s,"P",{"data-svelte-h":!0}),m(ms)!=="svelte-16m3n59"&&(ms.textContent=Vl),wn=t(s),us=r(s,"UL",{"data-svelte-h":!0}),m(us)!=="svelte-97f948"&&(us.innerHTML=Bl),Tn=t(s),o(q.$$.fragment,s),Jn=t(s),os=r(s,"P",{"data-svelte-h":!0}),m(os)!=="svelte-miijey"&&(os.textContent=Wl),$n=t(s),o(is.$$.fragment,s),vn=t(s),U=r(s,"H2",{class:!0});var La=T(U);R=r(La,"A",{id:!0,class:!0,href:!0});var dn=T(R);ln=r(dn,"SPAN",{});var fn=T(ln);o(js.$$.fragment,fn),fn.forEach(n),dn.forEach(n),vl=t(La),Sa=r(La,"SPAN",{"data-svelte-h":!0}),m(Sa)!=="svelte-1psny5b"&&(Sa.textContent=Nl),La.forEach(n),_n=t(s),o(bs.$$.fragment,s),kn=t(s),ds=r(s,"P",{"data-svelte-h":!0}),m(ds)!=="svelte-1kdxp2p"&&(ds.innerHTML=Hl),xn=t(s),o(X.$$.fragment,s),In=t(s),fs=r(s,"P",{"data-svelte-h":!0}),m(fs)!=="svelte-1i45qiw"&&(fs.innerHTML=zl),Un=t(s),o(gs.$$.fragment,s),Cn=t(s),Ms=r(s,"P",{"data-svelte-h":!0}),m(Ms)!=="svelte-uv8q8p"&&(Ms.textContent=ql),Zn=t(s),o(ys.$$.fragment,s),Gn=t(s),ws=r(s,"P",{"data-svelte-h":!0}),m(ws)!=="svelte-19z6qke"&&(ws.textContent=Rl),Vn=t(s),Ts=r(s,"UL",{"data-svelte-h":!0}),m(Ts)!=="svelte-1l83r3n"&&(Ts.innerHTML=Xl),Bn=t(s),Js=r(s,"P",{"data-svelte-h":!0}),m(Js)!=="svelte-1nvt1pa"&&(Js.innerHTML=Yl),Wn=t(s),o($s.$$.fragment,s),Nn=t(s),vs=r(s,"P",{"data-svelte-h":!0}),m(vs)!=="svelte-1b2ebhq"&&(vs.innerHTML=Al),Hn=t(s),_s=r(s,"P",{"data-svelte-h":!0}),m(_s)!=="svelte-838qsc"&&(_s.textContent=Fl),zn=t(s),o(ks.$$.fragment,s),qn=t(s),C=r(s,"H3",{class:!0});var Qa=T(C);Y=r(Qa,"A",{id:!0,class:!0,href:!0});var gn=T(Y);tn=r(gn,"SPAN",{});var Yt=T(tn);o(xs.$$.fragment,Yt),Yt.forEach(n),gn.forEach(n),_l=t(Qa),Da=r(Qa,"SPAN",{"data-svelte-h":!0}),m(Da)!=="svelte-1jjli6i"&&(Da.textContent=El),Qa.forEach(n),Rn=t(s),Is=r(s,"P",{"data-svelte-h":!0}),m(Is)!=="svelte-uq7hrd"&&(Is.innerHTML=Ll),Xn=t(s),Us=r(s,"P",{"data-svelte-h":!0}),m(Us)!=="svelte-1ahwezm"&&(Us.innerHTML=Ql),Yn=t(s),o(Cs.$$.fragment,s),An=t(s),Zs=r(s,"P",{"data-svelte-h":!0}),m(Zs)!=="svelte-375nfh"&&(Zs.innerHTML=Pl),Fn=t(s),Z=r(s,"H3",{class:!0});var Ml=T(Z);A=r(Ml,"A",{id:!0,class:!0,href:!0});var At=T(A);pn=r(At,"SPAN",{});var Ft=T(pn);o(Gs.$$.fragment,Ft),Ft.forEach(n),At.forEach(n),kl=t(Ml),Ka=r(Ml,"SPAN",{"data-svelte-h":!0}),m(Ka)!=="svelte-p4w768"&&(Ka.textContent=Sl),Ml.forEach(n),En=t(s),Vs=r(s,"P",{"data-svelte-h":!0}),m(Vs)!=="svelte-1pf21dx"&&(Vs.textContent=Dl),Ln=t(s),Bs=r(s,"P",{"data-svelte-h":!0}),m(Bs)!=="svelte-1nn988l"&&(Bs.innerHTML=Kl),Qn=t(s),o(Ws.$$.fragment,s),Pn=t(s),o(F.$$.fragment,s),Sn=t(s),G=r(s,"H3",{class:!0});var yl=T(G);E=r(yl,"A",{id:!0,class:!0,href:!0});var Et=T(E);rn=r(Et,"SPAN",{});var Lt=T(rn);o(Ns.$$.fragment,Lt),Lt.forEach(n),Et.forEach(n),xl=t(yl),Oa=r(yl,"SPAN",{"data-svelte-h":!0}),m(Oa)!=="svelte-km5ht9"&&(Oa.textContent=Ol),yl.forEach(n),Dn=t(s),Hs=r(s,"P",{"data-svelte-h":!0}),m(Hs)!=="svelte-190ympp"&&(Hs.textContent=st),Kn=t(s),zs=r(s,"P",{"data-svelte-h":!0}),m(zs)!=="svelte-ynk6ab"&&(zs.innerHTML=at),On=t(s),o(L.$$.fragment,s),se=t(s),V=r(s,"H2",{class:!0});var wl=T(V);Q=r(wl,"A",{id:!0,class:!0,href:!0});var Qt=T(Q);cn=r(Qt,"SPAN",{});var Pt=T(cn);o(qs.$$.fragment,Pt),Pt.forEach(n),Qt.forEach(n),Il=t(wl),sn=r(wl,"SPAN",{"data-svelte-h":!0}),m(sn)!=="svelte-ivwwlt"&&(sn.textContent=nt),wl.forEach(n),ae=t(s),Rs=r(s,"P",{"data-svelte-h":!0}),m(Rs)!=="svelte-1h9zu4s"&&(Rs.innerHTML=et),ne=t(s),Xs=r(s,"P",{"data-svelte-h":!0}),m(Xs)!=="svelte-1hjibmo"&&(Xs.innerHTML=lt),ee=t(s),o(Ys.$$.fragment,s),le=t(s),As=r(s,"P",{"data-svelte-h":!0}),m(As)!=="svelte-1hq7vhu"&&(As.innerHTML=tt),te=t(s),o(Fs.$$.fragment,s),pe=t(s),Es=r(s,"P",{"data-svelte-h":!0}),m(Es)!=="svelte-1c6azkv"&&(Es.textContent=pt),re=t(s),Ls=r(s,"UL",{"data-svelte-h":!0}),m(Ls)!=="svelte-ykpien"&&(Ls.innerHTML=rt),ce=t(s),Qs=r(s,"P",{"data-svelte-h":!0}),m(Qs)!=="svelte-6giqvb"&&(Qs.innerHTML=ct),he=t(s),Ps=r(s,"OL",{"data-svelte-h":!0}),m(Ps)!=="svelte-uw28z6"&&(Ps.innerHTML=ht),me=t(s),o(Ss.$$.fragment,s),ue=t(s),P=r(s,"OL",{start:!0,"data-svelte-h":!0}),m(P)!=="svelte-1965xun"&&(P.innerHTML=mt),oe=t(s),o(Ds.$$.fragment,s),ie=t(s),Ks=r(s,"P",{"data-svelte-h":!0}),m(Ks)!=="svelte-1a0ukdn"&&(Ks.innerHTML=ut),je=t(s),Os=r(s,"P",{"data-svelte-h":!0}),m(Os)!=="svelte-n7j7us"&&(Os.innerHTML=ot),be=t(s),o(sa.$$.fragment,s),de=t(s),aa=r(s,"P",{"data-svelte-h":!0}),m(aa)!=="svelte-1yb546a"&&(aa.innerHTML=it),fe=t(s),o(na.$$.fragment,s),ge=t(s),ea=r(s,"P",{"data-svelte-h":!0}),m(ea)!=="svelte-bo476j"&&(ea.textContent=jt),Me=t(s),o(la.$$.fragment,s),ye=t(s),ta=r(s,"P",{"data-svelte-h":!0}),m(ta)!=="svelte-1407gba"&&(ta.textContent=bt),we=t(s),o(pa.$$.fragment,s),Te=t(s),ra=r(s,"P",{"data-svelte-h":!0}),m(ra)!=="svelte-niaq8z"&&(ra.innerHTML=dt),Je=t(s),o(ca.$$.fragment,s),$e=t(s),ha=r(s,"P",{"data-svelte-h":!0}),m(ha)!=="svelte-1n00f7l"&&(ha.textContent=ft),ve=t(s),o(ma.$$.fragment,s),_e=t(s),B=r(s,"H2",{class:!0});var Tl=T(B);S=r(Tl,"A",{id:!0,class:!0,href:!0});var St=T(S);hn=r(St,"SPAN",{});var Dt=T(hn);o(ua.$$.fragment,Dt),Dt.forEach(n),St.forEach(n),Ul=t(Tl),an=r(Tl,"SPAN",{"data-svelte-h":!0}),m(an)!=="svelte-1pyp6as"&&(an.textContent=gt),Tl.forEach(n),ke=t(s),oa=r(s,"P",{"data-svelte-h":!0}),m(oa)!=="svelte-14l1a6u"&&(oa.innerHTML=Mt),xe=t(s),o(D.$$.fragment,s),Ie=t(s),ia=r(s,"P",{"data-svelte-h":!0}),m(ia)!=="svelte-5trela"&&(ia.innerHTML=yt),Ue=t(s),o(K.$$.fragment,s),Ce=t(s),o(ja.$$.fragment,s),Ze=t(s),ba=r(s,"P",{"data-svelte-h":!0}),m(ba)!=="svelte-spzxn8"&&(ba.innerHTML=wt),Ge=t(s),o(da.$$.fragment,s),Ve=t(s),O=r(s,"DIV",{class:!0,"data-svelte-h":!0}),m(O)!=="svelte-1jzdron"&&(O.innerHTML=Tt),Be=t(s),fa=r(s,"P",{"data-svelte-h":!0}),m(fa)!=="svelte-67s7z7"&&(fa.innerHTML=Jt),We=t(s),o(ga.$$.fragment,s),Ne=t(s),Ma=r(s,"P",{"data-svelte-h":!0}),m(Ma)!=="svelte-1k4l269"&&(Ma.innerHTML=$t),He=t(s),ya=r(s,"OL",{"data-svelte-h":!0}),m(ya)!=="svelte-iu2fmq"&&(ya.innerHTML=vt),ze=t(s),o(wa.$$.fragment,s),qe=t(s),ss=r(s,"OL",{start:!0,"data-svelte-h":!0}),m(ss)!=="svelte-pnq83u"&&(ss.innerHTML=_t),Re=t(s),o(Ta.$$.fragment,s),Xe=t(s),o(as.$$.fragment,s),Ye=t(s),ns=r(s,"OL",{start:!0,"data-svelte-h":!0}),m(ns)!=="svelte-2r0sez"&&(ns.innerHTML=kt),Ae=t(s),o(Ja.$$.fragment,s),Fe=t(s),es=r(s,"OL",{start:!0,"data-svelte-h":!0}),m(es)!=="svelte-z5mlcc"&&(es.innerHTML=xt),Ee=t(s),o($a.$$.fragment,s),Le=t(s),va=r(s,"P",{"data-svelte-h":!0}),m(va)!=="svelte-trcbp4"&&(va.textContent=It),Qe=t(s),o(_a.$$.fragment,s),Pe=t(s),ls=r(s,"DIV",{class:!0,"data-svelte-h":!0}),m(ls)!=="svelte-mp8qzc"&&(ls.innerHTML=Ut),Se=t(s),o(ts.$$.fragment,s),De=t(s),W=r(s,"H3",{class:!0});var Jl=T(W);ps=r(Jl,"A",{id:!0,class:!0,href:!0});var Kt=T(ps);mn=r(Kt,"SPAN",{});var Ot=T(mn);o(ka.$$.fragment,Ot),Ot.forEach(n),Kt.forEach(n),Cl=t(Jl),nn=r(Jl,"SPAN",{"data-svelte-h":!0}),m(nn)!=="svelte-1jjli6i"&&(nn.textContent=Ct),Jl.forEach(n),Ke=t(s),xa=r(s,"P",{"data-svelte-h":!0}),m(xa)!=="svelte-18hkbxs"&&(xa.innerHTML=Zt),Oe=t(s),o(Ia.$$.fragment,s),sl=t(s),N=r(s,"H2",{class:!0});var $l=T(N);rs=r($l,"A",{id:!0,class:!0,href:!0});var sp=T(rs);un=r(sp,"SPAN",{});var ap=T(un);o(Ua.$$.fragment,ap),ap.forEach(n),sp.forEach(n),Zl=t($l),en=r($l,"SPAN",{"data-svelte-h":!0}),m(en)!=="svelte-atom6z"&&(en.textContent=Gt),$l.forEach(n),al=t(s),Ca=r(s,"P",{"data-svelte-h":!0}),m(Ca)!=="svelte-199ztpc"&&(Ca.innerHTML=Vt),nl=t(s),Za=r(s,"P",{"data-svelte-h":!0}),m(Za)!=="svelte-jbt1wq"&&(Za.innerHTML=Bt),el=t(s),o(Ga.$$.fragment,s),ll=t(s),Va=r(s,"P",{"data-svelte-h":!0}),m(Va)!=="svelte-1k5hdjd"&&(Va.innerHTML=Wt),tl=t(s),o(Ba.$$.fragment,s),pl=t(s),Wa=r(s,"P",{"data-svelte-h":!0}),m(Wa)!=="svelte-115u1vs"&&(Wa.innerHTML=Nt),rl=t(s),o(Na.$$.fragment,s),cl=t(s),Ha=r(s,"P",{"data-svelte-h":!0}),m(Ha)!=="svelte-mn9i5v"&&(Ha.innerHTML=Ht),hl=t(s),o(za.$$.fragment,s),ml=t(s),qa=r(s,"P",{"data-svelte-h":!0}),m(qa)!=="svelte-101da56"&&(qa.innerHTML=zt),ul=t(s),o(Ra.$$.fragment,s),ol=t(s),Xa=r(s,"OL",{"data-svelte-h":!0}),m(Xa)!=="svelte-1rrl7ud"&&(Xa.innerHTML=qt),il=t(s),o(Ya.$$.fragment,s),jl=t(s),cs=r(s,"OL",{start:!0,"data-svelte-h":!0}),m(cs)!=="svelte-ub4yka"&&(cs.innerHTML=Rt),bl=t(s),o(Aa.$$.fragment,s),dl=t(s),Fa=r(s,"P",{"data-svelte-h":!0}),m(Fa)!=="svelte-1fqvd5l"&&(Fa.innerHTML=Xt),fl=t(s),on=r(s,"P",{}),T(on).forEach(n),this.h()},h(){g(c,"name","hf:doc:metadata"),g(c,"content",JSON.stringify(Jp)),g($,"id","preprocess"),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"),g($,"href","#preprocess"),g(v,"class","relative group"),g(R,"id","natural-language-processing"),g(R,"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"),g(R,"href","#natural-language-processing"),g(U,"class","relative group"),g(Y,"id","pad"),g(Y,"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"),g(Y,"href","#pad"),g(C,"class","relative group"),g(A,"id","truncation"),g(A,"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"),g(A,"href","#truncation"),g(Z,"class","relative group"),g(E,"id","build-tensors"),g(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"),g(E,"href","#build-tensors"),g(G,"class","relative group"),g(Q,"id","audio"),g(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"),g(Q,"href","#audio"),g(V,"class","relative group"),g(P,"start","2"),g(S,"id","computer-vision"),g(S,"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"),g(S,"href","#computer-vision"),g(B,"class","relative group"),g(O,"class","flex justify-center"),g(ss,"start","2"),g(ns,"start","3"),g(es,"start","4"),g(ls,"class","flex justify-center"),g(ps,"id","pad"),g(ps,"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"),g(ps,"href","#pad"),g(W,"class","relative group"),g(rs,"id","multimodal"),g(rs,"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"),g(rs,"href","#multimodal"),g(N,"class","relative group"),g(cs,"start","2")},m(s,a){y(document.head,c),e(s,f,a),e(s,h,a),e(s,M,a),e(s,v,a),y(v,$),y($,_),i(I,_,null),y(v,k),y(v,x),e(s,Mn,a),i(hs,s,a),e(s,yn,a),e(s,ms,a),e(s,wn,a),e(s,us,a),e(s,Tn,a),i(q,s,a),e(s,Jn,a),e(s,os,a),e(s,$n,a),i(is,s,a),e(s,vn,a),e(s,U,a),y(U,R),y(R,ln),i(js,ln,null),y(U,vl),y(U,Sa),e(s,_n,a),i(bs,s,a),e(s,kn,a),e(s,ds,a),e(s,xn,a),i(X,s,a),e(s,In,a),e(s,fs,a),e(s,Un,a),i(gs,s,a),e(s,Cn,a),e(s,Ms,a),e(s,Zn,a),i(ys,s,a),e(s,Gn,a),e(s,ws,a),e(s,Vn,a),e(s,Ts,a),e(s,Bn,a),e(s,Js,a),e(s,Wn,a),i($s,s,a),e(s,Nn,a),e(s,vs,a),e(s,Hn,a),e(s,_s,a),e(s,zn,a),i(ks,s,a),e(s,qn,a),e(s,C,a),y(C,Y),y(Y,tn),i(xs,tn,null),y(C,_l),y(C,Da),e(s,Rn,a),e(s,Is,a),e(s,Xn,a),e(s,Us,a),e(s,Yn,a),i(Cs,s,a),e(s,An,a),e(s,Zs,a),e(s,Fn,a),e(s,Z,a),y(Z,A),y(A,pn),i(Gs,pn,null),y(Z,kl),y(Z,Ka),e(s,En,a),e(s,Vs,a),e(s,Ln,a),e(s,Bs,a),e(s,Qn,a),i(Ws,s,a),e(s,Pn,a),i(F,s,a),e(s,Sn,a),e(s,G,a),y(G,E),y(E,rn),i(Ns,rn,null),y(G,xl),y(G,Oa),e(s,Dn,a),e(s,Hs,a),e(s,Kn,a),e(s,zs,a),e(s,On,a),i(L,s,a),e(s,se,a),e(s,V,a),y(V,Q),y(Q,cn),i(qs,cn,null),y(V,Il),y(V,sn),e(s,ae,a),e(s,Rs,a),e(s,ne,a),e(s,Xs,a),e(s,ee,a),i(Ys,s,a),e(s,le,a),e(s,As,a),e(s,te,a),i(Fs,s,a),e(s,pe,a),e(s,Es,a),e(s,re,a),e(s,Ls,a),e(s,ce,a),e(s,Qs,a),e(s,he,a),e(s,Ps,a),e(s,me,a),i(Ss,s,a),e(s,ue,a),e(s,P,a),e(s,oe,a),i(Ds,s,a),e(s,ie,a),e(s,Ks,a),e(s,je,a),e(s,Os,a),e(s,be,a),i(sa,s,a),e(s,de,a),e(s,aa,a),e(s,fe,a),i(na,s,a),e(s,ge,a),e(s,ea,a),e(s,Me,a),i(la,s,a),e(s,ye,a),e(s,ta,a),e(s,we,a),i(pa,s,a),e(s,Te,a),e(s,ra,a),e(s,Je,a),i(ca,s,a),e(s,$e,a),e(s,ha,a),e(s,ve,a),i(ma,s,a),e(s,_e,a),e(s,B,a),y(B,S),y(S,hn),i(ua,hn,null),y(B,Ul),y(B,an),e(s,ke,a),e(s,oa,a),e(s,xe,a),i(D,s,a),e(s,Ie,a),e(s,ia,a),e(s,Ue,a),i(K,s,a),e(s,Ce,a),i(ja,s,a),e(s,Ze,a),e(s,ba,a),e(s,Ge,a),i(da,s,a),e(s,Ve,a),e(s,O,a),e(s,Be,a),e(s,fa,a),e(s,We,a),i(ga,s,a),e(s,Ne,a),e(s,Ma,a),e(s,He,a),e(s,ya,a),e(s,ze,a),i(wa,s,a),e(s,qe,a),e(s,ss,a),e(s,Re,a),i(Ta,s,a),e(s,Xe,a),i(as,s,a),e(s,Ye,a),e(s,ns,a),e(s,Ae,a),i(Ja,s,a),e(s,Fe,a),e(s,es,a),e(s,Ee,a),i($a,s,a),e(s,Le,a),e(s,va,a),e(s,Qe,a),i(_a,s,a),e(s,Pe,a),e(s,ls,a),e(s,Se,a),i(ts,s,a),e(s,De,a),e(s,W,a),y(W,ps),y(ps,mn),i(ka,mn,null),y(W,Cl),y(W,nn),e(s,Ke,a),e(s,xa,a),e(s,Oe,a),i(Ia,s,a),e(s,sl,a),e(s,N,a),y(N,rs),y(rs,un),i(Ua,un,null),y(N,Zl),y(N,en),e(s,al,a),e(s,Ca,a),e(s,nl,a),e(s,Za,a),e(s,el,a),i(Ga,s,a),e(s,ll,a),e(s,Va,a),e(s,tl,a),i(Ba,s,a),e(s,pl,a),e(s,Wa,a),e(s,rl,a),i(Na,s,a),e(s,cl,a),e(s,Ha,a),e(s,hl,a),i(za,s,a),e(s,ml,a),e(s,qa,a),e(s,ul,a),i(Ra,s,a),e(s,ol,a),e(s,Xa,a),e(s,il,a),i(Ya,s,a),e(s,jl,a),e(s,cs,a),e(s,bl,a),i(Aa,s,a),e(s,dl,a),e(s,Fa,a),e(s,fl,a),e(s,on,a),gl=!0},p(s,[a]){const Ea={};a&2&&(Ea.$$scope={dirty:a,ctx:s}),q.$set(Ea);const jn={};a&2&&(jn.$$scope={dirty:a,ctx:s}),X.$set(jn);const bn={};a&2&&(bn.$$scope={dirty:a,ctx:s}),F.$set(bn);const La={};a&2&&(La.$$scope={dirty:a,ctx:s}),L.$set(La);const dn={};a&2&&(dn.$$scope={dirty:a,ctx:s}),D.$set(dn);const fn={};a&2&&(fn.$$scope={dirty:a,ctx:s}),K.$set(fn);const Qa={};a&2&&(Qa.$$scope={dirty:a,ctx:s}),as.$set(Qa);const gn={};a&2&&(gn.$$scope={dirty:a,ctx:s}),ts.$set(gn)},i(s){gl||(j(I.$$.fragment,s),j(hs.$$.fragment,s),j(q.$$.fragment,s),j(is.$$.fragment,s),j(js.$$.fragment,s),j(bs.$$.fragment,s),j(X.$$.fragment,s),j(gs.$$.fragment,s),j(ys.$$.fragment,s),j($s.$$.fragment,s),j(ks.$$.fragment,s),j(xs.$$.fragment,s),j(Cs.$$.fragment,s),j(Gs.$$.fragment,s),j(Ws.$$.fragment,s),j(F.$$.fragment,s),j(Ns.$$.fragment,s),j(L.$$.fragment,s),j(qs.$$.fragment,s),j(Ys.$$.fragment,s),j(Fs.$$.fragment,s),j(Ss.$$.fragment,s),j(Ds.$$.fragment,s),j(sa.$$.fragment,s),j(na.$$.fragment,s),j(la.$$.fragment,s),j(pa.$$.fragment,s),j(ca.$$.fragment,s),j(ma.$$.fragment,s),j(ua.$$.fragment,s),j(D.$$.fragment,s),j(K.$$.fragment,s),j(ja.$$.fragment,s),j(da.$$.fragment,s),j(ga.$$.fragment,s),j(wa.$$.fragment,s),j(Ta.$$.fragment,s),j(as.$$.fragment,s),j(Ja.$$.fragment,s),j($a.$$.fragment,s),j(_a.$$.fragment,s),j(ts.$$.fragment,s),j(ka.$$.fragment,s),j(Ia.$$.fragment,s),j(Ua.$$.fragment,s),j(Ga.$$.fragment,s),j(Ba.$$.fragment,s),j(Na.$$.fragment,s),j(za.$$.fragment,s),j(Ra.$$.fragment,s),j(Ya.$$.fragment,s),j(Aa.$$.fragment,s),gl=!0)},o(s){b(I.$$.fragment,s),b(hs.$$.fragment,s),b(q.$$.fragment,s),b(is.$$.fragment,s),b(js.$$.fragment,s),b(bs.$$.fragment,s),b(X.$$.fragment,s),b(gs.$$.fragment,s),b(ys.$$.fragment,s),b($s.$$.fragment,s),b(ks.$$.fragment,s),b(xs.$$.fragment,s),b(Cs.$$.fragment,s),b(Gs.$$.fragment,s),b(Ws.$$.fragment,s),b(F.$$.fragment,s),b(Ns.$$.fragment,s),b(L.$$.fragment,s),b(qs.$$.fragment,s),b(Ys.$$.fragment,s),b(Fs.$$.fragment,s),b(Ss.$$.fragment,s),b(Ds.$$.fragment,s),b(sa.$$.fragment,s),b(na.$$.fragment,s),b(la.$$.fragment,s),b(pa.$$.fragment,s),b(ca.$$.fragment,s),b(ma.$$.fragment,s),b(ua.$$.fragment,s),b(D.$$.fragment,s),b(K.$$.fragment,s),b(ja.$$.fragment,s),b(da.$$.fragment,s),b(ga.$$.fragment,s),b(wa.$$.fragment,s),b(Ta.$$.fragment,s),b(as.$$.fragment,s),b(Ja.$$.fragment,s),b($a.$$.fragment,s),b(_a.$$.fragment,s),b(ts.$$.fragment,s),b(ka.$$.fragment,s),b(Ia.$$.fragment,s),b(Ua.$$.fragment,s),b(Ga.$$.fragment,s),b(Ba.$$.fragment,s),b(Na.$$.fragment,s),b(za.$$.fragment,s),b(Ra.$$.fragment,s),b(Ya.$$.fragment,s),b(Aa.$$.fragment,s),gl=!1},d(s){s&&(n(f),n(h),n(M),n(v),n(Mn),n(yn),n(ms),n(wn),n(us),n(Tn),n(Jn),n(os),n($n),n(vn),n(U),n(_n),n(kn),n(ds),n(xn),n(In),n(fs),n(Un),n(Cn),n(Ms),n(Zn),n(Gn),n(ws),n(Vn),n(Ts),n(Bn),n(Js),n(Wn),n(Nn),n(vs),n(Hn),n(_s),n(zn),n(qn),n(C),n(Rn),n(Is),n(Xn),n(Us),n(Yn),n(An),n(Zs),n(Fn),n(Z),n(En),n(Vs),n(Ln),n(Bs),n(Qn),n(Pn),n(Sn),n(G),n(Dn),n(Hs),n(Kn),n(zs),n(On),n(se),n(V),n(ae),n(Rs),n(ne),n(Xs),n(ee),n(le),n(As),n(te),n(pe),n(Es),n(re),n(Ls),n(ce),n(Qs),n(he),n(Ps),n(me),n(ue),n(P),n(oe),n(ie),n(Ks),n(je),n(Os),n(be),n(de),n(aa),n(fe),n(ge),n(ea),n(Me),n(ye),n(ta),n(we),n(Te),n(ra),n(Je),n($e),n(ha),n(ve),n(_e),n(B),n(ke),n(oa),n(xe),n(Ie),n(ia),n(Ue),n(Ce),n(Ze),n(ba),n(Ge),n(Ve),n(O),n(Be),n(fa),n(We),n(Ne),n(Ma),n(He),n(ya),n(ze),n(qe),n(ss),n(Re),n(Xe),n(Ye),n(ns),n(Ae),n(Fe),n(es),n(Ee),n(Le),n(va),n(Qe),n(Pe),n(ls),n(Se),n(De),n(W),n(Ke),n(xa),n(Oe),n(sl),n(N),n(al),n(Ca),n(nl),n(Za),n(el),n(ll),n(Va),n(tl),n(pl),n(Wa),n(rl),n(cl),n(Ha),n(hl),n(ml),n(qa),n(ul),n(ol),n(Xa),n(il),n(jl),n(cs),n(bl),n(dl),n(Fa),n(fl),n(on)),n(c),d(I),d(hs,s),d(q,s),d(is,s),d(js),d(bs,s),d(X,s),d(gs,s),d(ys,s),d($s,s),d(ks,s),d(xs),d(Cs,s),d(Gs),d(Ws,s),d(F,s),d(Ns),d(L,s),d(qs),d(Ys,s),d(Fs,s),d(Ss,s),d(Ds,s),d(sa,s),d(na,s),d(la,s),d(pa,s),d(ca,s),d(ma,s),d(ua),d(D,s),d(K,s),d(ja,s),d(da,s),d(ga,s),d(wa,s),d(Ta,s),d(as,s),d(Ja,s),d($a,s),d(_a,s),d(ts,s),d(ka),d(Ia,s),d(Ua),d(Ga,s),d(Ba,s),d(Na,s),d(za,s),d(Ra,s),d(Ya,s),d(Aa,s)}}}const Jp={local:"preprocess",sections:[{local:"natural-language-processing",sections:[{local:"pad",title:"Pad"},{local:"truncation",title:"Truncation"},{local:"build-tensors",title:"Build tensors"}],title:"Natural Language Processing"},{local:"audio",title:"Audio"},{local:"computer-vision",sections:[{local:"pad",title:"Pad"}],title:"Computer vision"},{local:"multimodal",title:"Multimodal"}],title:"Preprocess"};function $p(J){return lp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Gp extends tp{constructor(c){super(),pp(this,c,$p,Tp,ep,{})}}export{Gp as component};
