import{s as Re,o as Xe,n as I}from"../chunks/scheduler.9991993c.js";import{S as Ye,i as Ne,g as c,s as e,r as h,A as qe,h as m,f as n,c as p,j as He,u as j,x as u,k as _,y as Fe,a as l,v as b,d as o,t as i,w as d}from"../chunks/index.7fc9a5e7.js";import{T as Ia}from"../chunks/Tip.9de92fc6.js";import{Y as Le}from"../chunks/Youtube.7934cf81.js";import{C as g}from"../chunks/CodeBlock.e11cba92.js";import{D as Qe}from"../chunks/DocNotebookDropdown.a0cb4c0f.js";import{F as Ee,M as ze}from"../chunks/Markdown.87f31c7e.js";import{H as U,E as Ae}from"../chunks/EditOnGithub.84ab7f0e.js";function Pe(T){let t,f="<code>AutoProcessor</code> <strong>始终</strong>有效的自动选择适用于您使用的模型的正确<code>class</code>，无论您使用的是<code>Tokenizer</code>、<code>ImageProcessor</code>、<code>Feature extractor</code>还是<code>Processor</code>。";return{c(){t=c("p"),t.innerHTML=f},l(r){t=m(r,"P",{"data-svelte-h":!0}),u(t)!=="svelte-15q7u4p"&&(t.innerHTML=f)},m(r,M){l(r,t,M)},p:I,d(r){r&&n(t)}}}function Se(T){let t,f="如果您计划使用预训练模型，重要的是使用与之关联的预训练<code>Tokenizer</code>。这确保文本的拆分方式与预训练语料库相同，并在预训练期间使用相同的标记-索引的对应关系（通常称为<em>词汇表</em>-<code>vocab</code>）。";return{c(){t=c("p"),t.innerHTML=f},l(r){t=m(r,"P",{"data-svelte-h":!0}),u(t)!=="svelte-7bavid"&&(t.innerHTML=f)},m(r,M){l(r,t,M)},p:I,d(r){r&&n(t)}}}function De(T){let t,f='查看<a href="./pad_truncation">填充和截断</a>概念指南，了解更多有关填充和截断参数的信息。';return{c(){t=c("p"),t.innerHTML=f},l(r){t=m(r,"P",{"data-svelte-h":!0}),u(t)!=="svelte-127dmqz"&&(t.innerHTML=f)},m(r,M){l(r,t,M)},p:I,d(r){r&&n(t)}}}function Ke(T){let t,f;return t=new g({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(){h(t.$$.fragment)},l(r){j(t.$$.fragment,r)},m(r,M){b(t,r,M),f=!0},p:I,i(r){f||(o(t.$$.fragment,r),f=!0)},o(r){i(t.$$.fragment,r),f=!1},d(r){d(t,r)}}}function Oe(T){let t,f;return t=new ze({props:{$$slots:{default:[Ke]},$$scope:{ctx:T}}}),{c(){h(t.$$.fragment)},l(r){j(t.$$.fragment,r)},m(r,M){b(t,r,M),f=!0},p(r,M){const $={};M&2&&($.$$scope={dirty:M,ctx:r}),t.$set($)},i(r){f||(o(t.$$.fragment,r),f=!0)},o(r){i(t.$$.fragment,r),f=!1},d(r){d(t,r)}}}function sp(T){let t,f;return t=new g({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(){h(t.$$.fragment)},l(r){j(t.$$.fragment,r)},m(r,M){b(t,r,M),f=!0},p:I,i(r){f||(o(t.$$.fragment,r),f=!0)},o(r){i(t.$$.fragment,r),f=!1},d(r){d(t,r)}}}function ap(T){let t,f;return t=new ze({props:{$$slots:{default:[sp]},$$scope:{ctx:T}}}),{c(){h(t.$$.fragment)},l(r){j(t.$$.fragment,r)},m(r,M){b(t,r,M),f=!0},p(r,M){const $={};M&2&&($.$$scope={dirty:M,ctx:r}),t.$set($)},i(r){f||(o(t.$$.fragment,r),f=!0)},o(r){i(t.$$.fragment,r),f=!1},d(r){d(t,r)}}}function np(T){let t,f="图像预处理通常遵循某种形式的图像增强。图像预处理和图像增强都会改变图像数据，但它们有不同的目的：",r,M,$="<li>图像增强可以帮助防止过拟合并增加模型的鲁棒性。您可以在数据增强方面充分发挥创造性 - 调整亮度和颜色、裁剪、旋转、调整大小、缩放等。但要注意不要改变图像的含义。</li> <li>图像预处理确保图像与模型预期的输入格式匹配。在微调计算机视觉模型时，必须对图像进行与模型训练时相同的预处理。</li>",y,w,F="您可以使用任何您喜欢的图像增强库。对于图像预处理，请使用与模型相关联的<code>ImageProcessor</code>。";return{c(){t=c("p"),t.textContent=f,r=e(),M=c("ul"),M.innerHTML=$,y=e(),w=c("p"),w.innerHTML=F},l(J){t=m(J,"P",{"data-svelte-h":!0}),u(t)!=="svelte-27y3x3"&&(t.textContent=f),r=p(J),M=m(J,"UL",{"data-svelte-h":!0}),u(M)!=="svelte-1blarz1"&&(M.innerHTML=$),y=p(J),w=m(J,"P",{"data-svelte-h":!0}),u(w)!=="svelte-6589u"&&(w.innerHTML=F)},m(J,v){l(J,t,v),l(J,r,v),l(J,M,v),l(J,y,v),l(J,w,v)},p:I,d(J){J&&(n(t),n(r),n(M),n(y),n(w))}}}function lp(T){let t,f="因为数据集相当大，请使用🤗 Datasets的<code>split</code>参数加载训练集中的少量样本！";return{c(){t=c("p"),t.innerHTML=f},l(r){t=m(r,"P",{"data-svelte-h":!0}),u(t)!=="svelte-wwkorl"&&(t.innerHTML=f)},m(r,M){l(r,t,M)},p:I,d(r){r&&n(t)}}}function ep(T){let t,f="在上面的示例中，我们设置<code>do_resize=False</code>，因为我们已经在图像增强转换中调整了图像的大小，并利用了适当的<code>image_processor</code>的<code>size</code>属性。如果您在图像增强期间不调整图像的大小，请将此参数排除在外。默认情况下<code>ImageProcessor</code>将处理调整大小。",r,M,$="如果希望将图像标准化步骤为图像增强的一部分，请使用<code>image_processor.image_mean</code>和<code>image_processor.image_std</code>。";return{c(){t=c("p"),t.innerHTML=f,r=e(),M=c("p"),M.innerHTML=$},l(y){t=m(y,"P",{"data-svelte-h":!0}),u(t)!=="svelte-9t0loq"&&(t.innerHTML=f),r=p(y),M=m(y,"P",{"data-svelte-h":!0}),u(M)!=="svelte-52fc91"&&(M.innerHTML=$)},m(y,w){l(y,t,w),l(y,r,w),l(y,M,w)},p:I,d(y){y&&(n(t),n(r),n(M))}}}function pp(T){let t,f="对于诸如目标检测、语义分割、实例分割和全景分割等任务，<code>ImageProcessor</code>提供了训练后处理方法。这些方法将模型的原始输出转换为有意义的预测，如边界框或分割地图。";return{c(){t=c("p"),t.innerHTML=f},l(r){t=m(r,"P",{"data-svelte-h":!0}),u(t)!=="svelte-1hjrx53"&&(t.innerHTML=f)},m(r,M){l(r,t,M)},p:I,d(r){r&&n(t)}}}function tp(T){let t,f,r,M,$,y,w,F,J,v="在您可以在数据集上训练模型之前，数据需要被预处理为期望的模型输入格式。无论您的数据是文本、图像还是音频，它们都需要被转换并组合成批量的张量。🤗 Transformers 提供了一组预处理类来帮助准备数据以供模型使用。在本教程中，您将了解以下内容：",ka,L,kl='<li>对于文本，使用<a href="./main_classes/tokenizer">分词器</a>(<code>Tokenizer</code>)将文本转换为一系列标记(<code>tokens</code>)，并创建<code>tokens</code>的数字表示，将它们组合成张量。</li> <li>对于语音和音频，使用<a href="./main_classes/feature_extractor">特征提取器</a>(<code>Feature extractor</code>)从音频波形中提取顺序特征并将其转换为张量。</li> <li>图像输入使用<a href="./main_classes/image">图像处理器</a>(<code>ImageProcessor</code>)将图像转换为张量。</li> <li>多模态输入，使用<a href="./main_classes/processors">处理器</a>(<code>Processor</code>)结合了<code>Tokenizer</code>和<code>ImageProcessor</code>或<code>Processor</code>。</li>',xa,k,Ca,Q,xl="在开始之前，请安装🤗 Datasets，以便您可以加载一些数据集来进行实验：",Za,E,Ga,A,Va,P,Ba,S,Cl='处理文本数据的主要工具是<a href="main_classes/tokenizer">Tokenizer</a>。<code>Tokenizer</code>根据一组规则将文本拆分为<code>tokens</code>。然后将这些<code>tokens</code>转换为数字，然后转换为张量，成为模型的输入。模型所需的任何附加输入都由<code>Tokenizer</code>添加。',Wa,x,Ha,D,Zl="开始使用<code>AutoTokenizer.from_pretrained()</code>方法加载一个预训练<code>tokenizer</code>。这将下载模型预训练的<code>vocab</code>：",za,K,Ra,O,Gl="然后将您的文本传递给<code>tokenizer</code>：",Xa,ss,Ya,as,Vl="<code>tokenizer</code>返回一个包含三个重要对象的字典：",Na,ns,Bl='<li><a href="glossary#input-ids">input_ids</a> 是与句子中每个<code>token</code>对应的索引。</li> <li><a href="glossary#attention-mask">attention_mask</a> 指示是否应该关注一个<code>token</code>。</li> <li><a href="glossary#token-type-ids">token_type_ids</a> 在存在多个序列时标识一个<code>token</code>属于哪个序列。</li>',qa,ls,Wl="通过解码 <code>input_ids</code> 来返回您的输入：",Fa,es,La,ps,Hl="如您所见，<code>tokenizer</code>向句子中添加了两个特殊<code>token</code> - <code>CLS</code> 和 <code>SEP</code>（分类器和分隔符）。并非所有模型都需要特殊<code>token</code>，但如果需要，<code>tokenizer</code>会自动为您添加。",Qa,ts,zl="如果有多个句子需要预处理，将它们作为列表传递给<code>tokenizer</code>：",Ea,rs,Aa,cs,Pa,ms,Rl="句子的长度并不总是相同，这可能会成为一个问题，因为模型输入的张量需要具有统一的形状。填充是一种策略，通过在较短的句子中添加一个特殊的<code>padding token</code>，以确保张量是矩形的。",Sa,us,Xl="将 <code>padding</code> 参数设置为 <code>True</code>，以使批次中较短的序列填充到与最长序列相匹配的长度：",Da,hs,Ka,js,Yl="第一句和第三句因为较短，通过<code>0</code>进行填充，。",Oa,bs,sn,os,Nl="另一方面，有时候一个序列可能对模型来说太长了。在这种情况下，您需要将序列截断为更短的长度。",an,is,ql="将 <code>truncation</code> 参数设置为 <code>True</code>，以将序列截断为模型接受的最大长度：",nn,ds,ln,C,en,fs,pn,Ms,Fl="最后，<code>tokenizer</code>可以返回实际输入到模型的张量。",tn,gs,Ll="将 <code>return_tensors</code> 参数设置为 <code>pt</code>（对于PyTorch）或 <code>tf</code>（对于TensorFlow）：",rn,Z,cn,Ts,mn,Js,Ql='对于音频任务，您需要<a href="main_classes/feature_extractor">feature extractor</a>来准备您的数据集以供模型使用。<code>feature extractor</code>旨在从原始音频数据中提取特征，并将它们转换为张量。',un,$s,El='加载<a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">MInDS-14</a>数据集（有关如何加载数据集的更多详细信息，请参阅🤗 <a href="https://huggingface.co/docs/datasets/load_hub" rel="nofollow">Datasets教程</a>）以了解如何在音频数据集中使用<code>feature extractor</code>：',hn,ys,jn,ws,Al="访问 <code>audio</code> 列的第一个元素以查看输入。调用 <code>audio</code> 列会自动加载和重新采样音频文件：",bn,_s,on,Us,Pl="这会返回三个对象：",dn,Is,Sl="<li><code>array</code> 是加载的语音信号 - 并在必要时重新采为<code>1D array</code>。</li> <li><code>path</code> 指向音频文件的位置。</li> <li><code>sampling_rate</code> 是每秒测量的语音信号数据点数量。</li>",fn,vs,Dl='对于本教程，您将使用<a href="https://huggingface.co/facebook/wav2vec2-base" rel="nofollow">Wav2Vec2</a>模型。查看模型卡片，您将了解到Wav2Vec2是在16kHz采样的语音音频数据上预训练的。重要的是，您的音频数据的采样率要与用于预训练模型的数据集的采样率匹配。如果您的数据的采样率不同，那么您需要对数据进行重新采样。',Mn,ks,Kl="<li>使用🤗 Datasets的<code>cast_column</code>方法将采样率提升到16kHz：</li>",gn,xs,Tn,G,Ol="<li>再次调用 <code>audio</code> 列以重新采样音频文件：</li>",Jn,Cs,$n,Zs,se="接下来，加载一个<code>feature extractor</code>以对输入进行标准化和填充。当填充文本数据时，会为较短的序列添加 <code>0</code>。相同的理念适用于音频数据。<code>feature extractor</code>添加 <code>0</code> - 被解释为静音 - 到<code>array</code> 。",yn,Gs,ae="使用 <code>AutoFeatureExtractor.from_pretrained()</code> 加载<code>feature extractor</code>：",wn,Vs,_n,Bs,ne="将音频 <code>array</code> 传递给<code>feature extractor</code>。我们还建议在<code>feature extractor</code>中添加 <code>sampling_rate</code> 参数，以更好地调试可能发生的静音错误：",Un,Ws,In,Hs,le="就像<code>tokenizer</code>一样，您可以应用填充或截断来处理批次中的可变序列。请查看这两个音频样本的序列长度：",vn,zs,kn,Rs,ee="创建一个函数来预处理数据集，以使音频样本具有相同的长度。通过指定最大样本长度，<code>feature extractor</code>将填充或截断序列以使其匹配：",xn,Xs,Cn,Ys,pe="将<code>preprocess_function</code>应用于数据集中的前几个示例：",Zn,Ns,Gn,qs,te="现在样本长度是相同的，并且与指定的最大长度匹配。您现在可以将经过处理的数据集传递给模型了！",Vn,Fs,Bn,Ls,Wn,Qs,re='对于计算机视觉任务，您需要一个<a href="main_classes/image_processor">image processor</a>来准备数据集以供模型使用。图像预处理包括多个步骤将图像转换为模型期望输入的格式。这些步骤包括但不限于调整大小、标准化、颜色通道校正以及将图像转换为张量。',Hn,V,zn,Es,ce='加载<a href="https://huggingface.co/datasets/food101" rel="nofollow">food101</a>数据集（有关如何加载数据集的更多详细信息，请参阅🤗 <a href="https://huggingface.co/docs/datasets/load_hub" rel="nofollow">Datasets教程</a>）以了解如何在计算机视觉数据集中使用图像处理器：',Rn,B,Xn,As,Yn,Ps,me='接下来，使用🤗 Datasets的<a href="https://huggingface.co/docs/datasets/package_reference/main_classes?highlight=image#datasets.Image" rel="nofollow"><code>Image</code></a>功能查看图像：',Nn,Ss,qn,W,ue='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/vision-preprocess-tutorial.png"/>',Fn,Ds,he="使用 <code>AutoImageProcessor.from_pretrained()</code> 加载<code>image processor</code>：",Ln,Ks,Qn,Os,je='首先，让我们进行图像增强。您可以使用任何您喜欢的库，但在本教程中，我们将使用torchvision的<a href="https://pytorch.org/vision/stable/transforms.html" rel="nofollow"><code>transforms</code></a>模块。如果您有兴趣使用其他数据增强库，请参阅<a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification_albumentations.ipynb" rel="nofollow">Albumentations</a>或<a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification_kornia.ipynb" rel="nofollow">Kornia notebooks</a>中的示例。',En,sa,be='<li>在这里，我们使用<a href="https://pytorch.org/vision/master/generated/torchvision.transforms.Compose.html" rel="nofollow"><code>Compose</code></a>将<a href="https://pytorch.org/vision/main/generated/torchvision.transforms.RandomResizedCrop.html" rel="nofollow"><code>RandomResizedCrop</code></a>和 <a href="https://pytorch.org/vision/main/generated/torchvision.transforms.ColorJitter.html" rel="nofollow"><code>ColorJitter</code></a>变换连接在一起。请注意，对于调整大小，我们可以从<code>image_processor</code>中获取图像尺寸要求。对于一些模型，精确的高度和宽度需要被定义，对于其他模型只需定义<code>shortest_edge</code>。</li>',An,aa,Pn,H,oe='<li>模型接受 <a href="model_doc/visionencoderdecoder#transformers.VisionEncoderDecoderModel.forward.pixel_values"><code>pixel_values</code></a> 作为输入。<code>ImageProcessor</code> 可以进行图像的标准化，并生成适当的张量。创建一个函数，将图像增强和图像预处理步骤组合起来处理批量图像，并生成 <code>pixel_values</code>：</li>',Sn,na,Dn,z,Kn,R,ie='<li>然后使用🤗 Datasets的<a href="https://huggingface.co/docs/datasets/process#format-transform" rel="nofollow"><code>set_transform</code></a>在运行时应用这些变换：</li>',On,la,sl,X,de="<li>现在，当您访问图像时，您将注意到<code>image processor</code>已添加了 <code>pixel_values</code>。您现在可以将经过处理的数据集传递给模型了！</li>",al,ea,nl,pa,fe="这是在应用变换后的图像样子。图像已被随机裁剪，并其颜色属性发生了变化。",ll,ta,el,Y,Me='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/preprocessed_image.png"/>',pl,N,tl,ra,rl,ca,ge='在某些情况下，例如，在微调<a href="./model_doc/detr">DETR</a>时，模型在训练时应用了尺度增强。这可能导致批处理中的图像大小不同。您可以使用<code>DetrImageProcessor.pad()</code>来指定自定义的<code>collate_fn</code>将图像批处理在一起。',cl,ma,ml,ua,ul,ha,Te='对于涉及多模态输入的任务，您需要<a href="main_classes/processors">processor</a>来为模型准备数据集。<code>processor</code>将两个处理对象-例如<code>tokenizer</code>和<code>feature extractor</code>-组合在一起。',hl,ja,Je='加载<a href="https://huggingface.co/datasets/lj_speech" rel="nofollow">LJ Speech</a>数据集（有关如何加载数据集的更多详细信息，请参阅🤗 <a href="https://huggingface.co/docs/datasets/load_hub" rel="nofollow">Datasets 教程</a>）以了解如何使用<code>processor</code>进行自动语音识别（ASR）：',jl,ba,bl,oa,$e="对于ASR（自动语音识别），主要关注<code>audio</code>和<code>text</code>，因此可以删除其他列：",ol,ia,il,da,ye="现在查看<code>audio</code>和<code>text</code>列：",dl,fa,fl,Ma,we='请记住，您应始终<a href="preprocessing#audio">重新采样</a>音频数据集的采样率，以匹配用于预训练模型数据集的采样率！',Ml,ga,gl,Ta,_e="使用<code>AutoProcessor.from_pretrained()</code>加载一个<code>processor</code>：",Tl,Ja,Jl,$a,Ue="<li>创建一个函数，用于将包含在 <code>array</code> 中的音频数据处理为 <code>input_values</code>，并将 <code>text</code> 标记为 <code>labels</code>。这些将是输入模型的数据：</li>",$l,ya,yl,q,Ie="<li>将 <code>prepare_dataset</code> 函数应用于一个示例：</li>",wl,wa,_l,_a,ve="<code>processor</code>现在已经添加了 <code>input_values</code> 和 <code>labels</code>，并且采样率也正确降低为为16kHz。现在可以将处理后的数据集传递给模型！",Ul,Ua,Il,va,vl;return $=new U({props:{title:"预处理",local:"预处理",headingTag:"h1"}}),w=new Qe({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/zh/preprocessing.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/zh/pytorch/preprocessing.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/zh/tensorflow/preprocessing.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/zh/preprocessing.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/zh/pytorch/preprocessing.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/zh/tensorflow/preprocessing.ipynb"}]}}),k=new Ia({props:{$$slots:{default:[Pe]},$$scope:{ctx:T}}}),E=new g({props:{code:"cGlwJTIwaW5zdGFsbCUyMGRhdGFzZXRz",highlighted:"pip install datasets",wrap:!1}}),A=new U({props:{title:"自然语言处理",local:"自然语言处理",headingTag:"h2"}}),P=new Le({props:{id:"Yffk5aydLzg"}}),x=new Ia({props:{$$slots:{default:[Se]},$$scope:{ctx:T}}}),K=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUtYmVydCUyRmJlcnQtYmFzZS1jYXNlZCUyMik=",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;google-bert/bert-base-cased&quot;</span>)`,wrap:!1}}),ss=new g({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}}),es=new g({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}}),rs=new g({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}}),cs=new U({props:{title:"填充",local:"填充",headingTag:"h3"}}),hs=new g({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}}),bs=new U({props:{title:"截断",local:"截断",headingTag:"h3"}}),ds=new g({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}}),C=new Ia({props:{$$slots:{default:[De]},$$scope:{ctx:T}}}),fs=new U({props:{title:"构建张量",local:"构建张量",headingTag:"h3"}}),Z=new Ee({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ap],pytorch:[Oe]},$$scope:{ctx:T}}}),Ts=new U({props:{title:"音频",local:"音频",headingTag:"h2"}}),ys=new g({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}}),_s=new g({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}}),xs=new g({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}}),Cs=new g({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}}),Vs=new g({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}}),Ws=new g({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}}),zs=new g({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}}),Xs=new g({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}}),Ns=new g({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}}),Fs=new g({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}}),Ls=new U({props:{title:"计算机视觉",local:"计算机视觉",headingTag:"h2"}}),V=new Ia({props:{$$slots:{default:[np]},$$scope:{ctx:T}}}),B=new Ia({props:{$$slots:{default:[lp]},$$scope:{ctx:T}}}),As=new g({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}}),Ss=new g({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}}),Ks=new g({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}}),aa=new g({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}}),na=new g({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}}),z=new Ia({props:{$$slots:{default:[ep]},$$scope:{ctx:T}}}),la=new g({props:{code:"ZGF0YXNldC5zZXRfdHJhbnNmb3JtKHRyYW5zZm9ybXMp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset.set_transform(transforms)',wrap:!1}}),ea=new g({props:{code:"ZGF0YXNldCU1QjAlNUQua2V5cygp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-number">0</span>].keys()',wrap:!1}}),ta=new g({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}}),N=new Ia({props:{$$slots:{default:[pp]},$$scope:{ctx:T}}}),ra=new U({props:{title:"填充",local:"填充",headingTag:"h3"}}),ma=new g({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 U({props:{title:"多模态",local:"多模态",headingTag:"h2"}}),ba=new g({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}}),ia=new g({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}}),fa=new g({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}}),ga=new g({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}}),Ja=new g({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 g({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}}),wa=new g({props:{code:"cHJlcGFyZV9kYXRhc2V0KGxqX3NwZWVjaCU1QjAlNUQp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>prepare_dataset(lj_speech[<span class="hljs-number">0</span>])',wrap:!1}}),Ua=new Ae({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/zh/preprocessing.md"}}),{c(){t=c("meta"),f=e(),r=c("p"),M=e(),h($.$$.fragment),y=e(),h(w.$$.fragment),F=e(),J=c("p"),J.textContent=v,ka=e(),L=c("ul"),L.innerHTML=kl,xa=e(),h(k.$$.fragment),Ca=e(),Q=c("p"),Q.textContent=xl,Za=e(),h(E.$$.fragment),Ga=e(),h(A.$$.fragment),Va=e(),h(P.$$.fragment),Ba=e(),S=c("p"),S.innerHTML=Cl,Wa=e(),h(x.$$.fragment),Ha=e(),D=c("p"),D.innerHTML=Zl,za=e(),h(K.$$.fragment),Ra=e(),O=c("p"),O.innerHTML=Gl,Xa=e(),h(ss.$$.fragment),Ya=e(),as=c("p"),as.innerHTML=Vl,Na=e(),ns=c("ul"),ns.innerHTML=Bl,qa=e(),ls=c("p"),ls.innerHTML=Wl,Fa=e(),h(es.$$.fragment),La=e(),ps=c("p"),ps.innerHTML=Hl,Qa=e(),ts=c("p"),ts.innerHTML=zl,Ea=e(),h(rs.$$.fragment),Aa=e(),h(cs.$$.fragment),Pa=e(),ms=c("p"),ms.innerHTML=Rl,Sa=e(),us=c("p"),us.innerHTML=Xl,Da=e(),h(hs.$$.fragment),Ka=e(),js=c("p"),js.innerHTML=Yl,Oa=e(),h(bs.$$.fragment),sn=e(),os=c("p"),os.textContent=Nl,an=e(),is=c("p"),is.innerHTML=ql,nn=e(),h(ds.$$.fragment),ln=e(),h(C.$$.fragment),en=e(),h(fs.$$.fragment),pn=e(),Ms=c("p"),Ms.innerHTML=Fl,tn=e(),gs=c("p"),gs.innerHTML=Ll,rn=e(),h(Z.$$.fragment),cn=e(),h(Ts.$$.fragment),mn=e(),Js=c("p"),Js.innerHTML=Ql,un=e(),$s=c("p"),$s.innerHTML=El,hn=e(),h(ys.$$.fragment),jn=e(),ws=c("p"),ws.innerHTML=Al,bn=e(),h(_s.$$.fragment),on=e(),Us=c("p"),Us.textContent=Pl,dn=e(),Is=c("ul"),Is.innerHTML=Sl,fn=e(),vs=c("p"),vs.innerHTML=Dl,Mn=e(),ks=c("ol"),ks.innerHTML=Kl,gn=e(),h(xs.$$.fragment),Tn=e(),G=c("ol"),G.innerHTML=Ol,Jn=e(),h(Cs.$$.fragment),$n=e(),Zs=c("p"),Zs.innerHTML=se,yn=e(),Gs=c("p"),Gs.innerHTML=ae,wn=e(),h(Vs.$$.fragment),_n=e(),Bs=c("p"),Bs.innerHTML=ne,Un=e(),h(Ws.$$.fragment),In=e(),Hs=c("p"),Hs.innerHTML=le,vn=e(),h(zs.$$.fragment),kn=e(),Rs=c("p"),Rs.innerHTML=ee,xn=e(),h(Xs.$$.fragment),Cn=e(),Ys=c("p"),Ys.innerHTML=pe,Zn=e(),h(Ns.$$.fragment),Gn=e(),qs=c("p"),qs.textContent=te,Vn=e(),h(Fs.$$.fragment),Bn=e(),h(Ls.$$.fragment),Wn=e(),Qs=c("p"),Qs.innerHTML=re,Hn=e(),h(V.$$.fragment),zn=e(),Es=c("p"),Es.innerHTML=ce,Rn=e(),h(B.$$.fragment),Xn=e(),h(As.$$.fragment),Yn=e(),Ps=c("p"),Ps.innerHTML=me,Nn=e(),h(Ss.$$.fragment),qn=e(),W=c("div"),W.innerHTML=ue,Fn=e(),Ds=c("p"),Ds.innerHTML=he,Ln=e(),h(Ks.$$.fragment),Qn=e(),Os=c("p"),Os.innerHTML=je,En=e(),sa=c("ol"),sa.innerHTML=be,An=e(),h(aa.$$.fragment),Pn=e(),H=c("ol"),H.innerHTML=oe,Sn=e(),h(na.$$.fragment),Dn=e(),h(z.$$.fragment),Kn=e(),R=c("ol"),R.innerHTML=ie,On=e(),h(la.$$.fragment),sl=e(),X=c("ol"),X.innerHTML=de,al=e(),h(ea.$$.fragment),nl=e(),pa=c("p"),pa.textContent=fe,ll=e(),h(ta.$$.fragment),el=e(),Y=c("div"),Y.innerHTML=Me,pl=e(),h(N.$$.fragment),tl=e(),h(ra.$$.fragment),rl=e(),ca=c("p"),ca.innerHTML=ge,cl=e(),h(ma.$$.fragment),ml=e(),h(ua.$$.fragment),ul=e(),ha=c("p"),ha.innerHTML=Te,hl=e(),ja=c("p"),ja.innerHTML=Je,jl=e(),h(ba.$$.fragment),bl=e(),oa=c("p"),oa.innerHTML=$e,ol=e(),h(ia.$$.fragment),il=e(),da=c("p"),da.innerHTML=ye,dl=e(),h(fa.$$.fragment),fl=e(),Ma=c("p"),Ma.innerHTML=we,Ml=e(),h(ga.$$.fragment),gl=e(),Ta=c("p"),Ta.innerHTML=_e,Tl=e(),h(Ja.$$.fragment),Jl=e(),$a=c("ol"),$a.innerHTML=Ue,$l=e(),h(ya.$$.fragment),yl=e(),q=c("ol"),q.innerHTML=Ie,wl=e(),h(wa.$$.fragment),_l=e(),_a=c("p"),_a.innerHTML=ve,Ul=e(),h(Ua.$$.fragment),Il=e(),va=c("p"),this.h()},l(s){const a=qe("svelte-u9bgzb",document.head);t=m(a,"META",{name:!0,content:!0}),a.forEach(n),f=p(s),r=m(s,"P",{}),He(r).forEach(n),M=p(s),j($.$$.fragment,s),y=p(s),j(w.$$.fragment,s),F=p(s),J=m(s,"P",{"data-svelte-h":!0}),u(J)!=="svelte-57hvw4"&&(J.textContent=v),ka=p(s),L=m(s,"UL",{"data-svelte-h":!0}),u(L)!=="svelte-1hsd81q"&&(L.innerHTML=kl),xa=p(s),j(k.$$.fragment,s),Ca=p(s),Q=m(s,"P",{"data-svelte-h":!0}),u(Q)!=="svelte-150n5d8"&&(Q.textContent=xl),Za=p(s),j(E.$$.fragment,s),Ga=p(s),j(A.$$.fragment,s),Va=p(s),j(P.$$.fragment,s),Ba=p(s),S=m(s,"P",{"data-svelte-h":!0}),u(S)!=="svelte-hnvf1k"&&(S.innerHTML=Cl),Wa=p(s),j(x.$$.fragment,s),Ha=p(s),D=m(s,"P",{"data-svelte-h":!0}),u(D)!=="svelte-15kukrx"&&(D.innerHTML=Zl),za=p(s),j(K.$$.fragment,s),Ra=p(s),O=m(s,"P",{"data-svelte-h":!0}),u(O)!=="svelte-1d8f6vo"&&(O.innerHTML=Gl),Xa=p(s),j(ss.$$.fragment,s),Ya=p(s),as=m(s,"P",{"data-svelte-h":!0}),u(as)!=="svelte-e4eoo0"&&(as.innerHTML=Vl),Na=p(s),ns=m(s,"UL",{"data-svelte-h":!0}),u(ns)!=="svelte-1gcejaa"&&(ns.innerHTML=Bl),qa=p(s),ls=m(s,"P",{"data-svelte-h":!0}),u(ls)!=="svelte-sxeuuy"&&(ls.innerHTML=Wl),Fa=p(s),j(es.$$.fragment,s),La=p(s),ps=m(s,"P",{"data-svelte-h":!0}),u(ps)!=="svelte-oa22aj"&&(ps.innerHTML=Hl),Qa=p(s),ts=m(s,"P",{"data-svelte-h":!0}),u(ts)!=="svelte-1sqwvy"&&(ts.innerHTML=zl),Ea=p(s),j(rs.$$.fragment,s),Aa=p(s),j(cs.$$.fragment,s),Pa=p(s),ms=m(s,"P",{"data-svelte-h":!0}),u(ms)!=="svelte-1gp4b45"&&(ms.innerHTML=Rl),Sa=p(s),us=m(s,"P",{"data-svelte-h":!0}),u(us)!=="svelte-1suq2wo"&&(us.innerHTML=Xl),Da=p(s),j(hs.$$.fragment,s),Ka=p(s),js=m(s,"P",{"data-svelte-h":!0}),u(js)!=="svelte-bt508w"&&(js.innerHTML=Yl),Oa=p(s),j(bs.$$.fragment,s),sn=p(s),os=m(s,"P",{"data-svelte-h":!0}),u(os)!=="svelte-ul5141"&&(os.textContent=Nl),an=p(s),is=m(s,"P",{"data-svelte-h":!0}),u(is)!=="svelte-171hj5z"&&(is.innerHTML=ql),nn=p(s),j(ds.$$.fragment,s),ln=p(s),j(C.$$.fragment,s),en=p(s),j(fs.$$.fragment,s),pn=p(s),Ms=m(s,"P",{"data-svelte-h":!0}),u(Ms)!=="svelte-1ulyw9u"&&(Ms.innerHTML=Fl),tn=p(s),gs=m(s,"P",{"data-svelte-h":!0}),u(gs)!=="svelte-bmegay"&&(gs.innerHTML=Ll),rn=p(s),j(Z.$$.fragment,s),cn=p(s),j(Ts.$$.fragment,s),mn=p(s),Js=m(s,"P",{"data-svelte-h":!0}),u(Js)!=="svelte-fm6sxq"&&(Js.innerHTML=Ql),un=p(s),$s=m(s,"P",{"data-svelte-h":!0}),u($s)!=="svelte-8imvfg"&&($s.innerHTML=El),hn=p(s),j(ys.$$.fragment,s),jn=p(s),ws=m(s,"P",{"data-svelte-h":!0}),u(ws)!=="svelte-118ophx"&&(ws.innerHTML=Al),bn=p(s),j(_s.$$.fragment,s),on=p(s),Us=m(s,"P",{"data-svelte-h":!0}),u(Us)!=="svelte-a5ua9y"&&(Us.textContent=Pl),dn=p(s),Is=m(s,"UL",{"data-svelte-h":!0}),u(Is)!=="svelte-1gxoqy4"&&(Is.innerHTML=Sl),fn=p(s),vs=m(s,"P",{"data-svelte-h":!0}),u(vs)!=="svelte-h6xqj"&&(vs.innerHTML=Dl),Mn=p(s),ks=m(s,"OL",{"data-svelte-h":!0}),u(ks)!=="svelte-9ax2i1"&&(ks.innerHTML=Kl),gn=p(s),j(xs.$$.fragment,s),Tn=p(s),G=m(s,"OL",{start:!0,"data-svelte-h":!0}),u(G)!=="svelte-1p22qwm"&&(G.innerHTML=Ol),Jn=p(s),j(Cs.$$.fragment,s),$n=p(s),Zs=m(s,"P",{"data-svelte-h":!0}),u(Zs)!=="svelte-2cgfbv"&&(Zs.innerHTML=se),yn=p(s),Gs=m(s,"P",{"data-svelte-h":!0}),u(Gs)!=="svelte-xzrjf3"&&(Gs.innerHTML=ae),wn=p(s),j(Vs.$$.fragment,s),_n=p(s),Bs=m(s,"P",{"data-svelte-h":!0}),u(Bs)!=="svelte-1xvgbwn"&&(Bs.innerHTML=ne),Un=p(s),j(Ws.$$.fragment,s),In=p(s),Hs=m(s,"P",{"data-svelte-h":!0}),u(Hs)!=="svelte-183ldyx"&&(Hs.innerHTML=le),vn=p(s),j(zs.$$.fragment,s),kn=p(s),Rs=m(s,"P",{"data-svelte-h":!0}),u(Rs)!=="svelte-ilj3t6"&&(Rs.innerHTML=ee),xn=p(s),j(Xs.$$.fragment,s),Cn=p(s),Ys=m(s,"P",{"data-svelte-h":!0}),u(Ys)!=="svelte-62hr3n"&&(Ys.innerHTML=pe),Zn=p(s),j(Ns.$$.fragment,s),Gn=p(s),qs=m(s,"P",{"data-svelte-h":!0}),u(qs)!=="svelte-un264e"&&(qs.textContent=te),Vn=p(s),j(Fs.$$.fragment,s),Bn=p(s),j(Ls.$$.fragment,s),Wn=p(s),Qs=m(s,"P",{"data-svelte-h":!0}),u(Qs)!=="svelte-2v430n"&&(Qs.innerHTML=re),Hn=p(s),j(V.$$.fragment,s),zn=p(s),Es=m(s,"P",{"data-svelte-h":!0}),u(Es)!=="svelte-gdab9d"&&(Es.innerHTML=ce),Rn=p(s),j(B.$$.fragment,s),Xn=p(s),j(As.$$.fragment,s),Yn=p(s),Ps=m(s,"P",{"data-svelte-h":!0}),u(Ps)!=="svelte-7qawrt"&&(Ps.innerHTML=me),Nn=p(s),j(Ss.$$.fragment,s),qn=p(s),W=m(s,"DIV",{class:!0,"data-svelte-h":!0}),u(W)!=="svelte-1jzdron"&&(W.innerHTML=ue),Fn=p(s),Ds=m(s,"P",{"data-svelte-h":!0}),u(Ds)!=="svelte-kepijv"&&(Ds.innerHTML=he),Ln=p(s),j(Ks.$$.fragment,s),Qn=p(s),Os=m(s,"P",{"data-svelte-h":!0}),u(Os)!=="svelte-19l2gf6"&&(Os.innerHTML=je),En=p(s),sa=m(s,"OL",{"data-svelte-h":!0}),u(sa)!=="svelte-1j9vt9e"&&(sa.innerHTML=be),An=p(s),j(aa.$$.fragment,s),Pn=p(s),H=m(s,"OL",{start:!0,"data-svelte-h":!0}),u(H)!=="svelte-7msee9"&&(H.innerHTML=oe),Sn=p(s),j(na.$$.fragment,s),Dn=p(s),j(z.$$.fragment,s),Kn=p(s),R=m(s,"OL",{start:!0,"data-svelte-h":!0}),u(R)!=="svelte-og6ks5"&&(R.innerHTML=ie),On=p(s),j(la.$$.fragment,s),sl=p(s),X=m(s,"OL",{start:!0,"data-svelte-h":!0}),u(X)!=="svelte-ywz9qn"&&(X.innerHTML=de),al=p(s),j(ea.$$.fragment,s),nl=p(s),pa=m(s,"P",{"data-svelte-h":!0}),u(pa)!=="svelte-15nxu0r"&&(pa.textContent=fe),ll=p(s),j(ta.$$.fragment,s),el=p(s),Y=m(s,"DIV",{class:!0,"data-svelte-h":!0}),u(Y)!=="svelte-mp8qzc"&&(Y.innerHTML=Me),pl=p(s),j(N.$$.fragment,s),tl=p(s),j(ra.$$.fragment,s),rl=p(s),ca=m(s,"P",{"data-svelte-h":!0}),u(ca)!=="svelte-q6pgt6"&&(ca.innerHTML=ge),cl=p(s),j(ma.$$.fragment,s),ml=p(s),j(ua.$$.fragment,s),ul=p(s),ha=m(s,"P",{"data-svelte-h":!0}),u(ha)!=="svelte-5ansls"&&(ha.innerHTML=Te),hl=p(s),ja=m(s,"P",{"data-svelte-h":!0}),u(ja)!=="svelte-14qicor"&&(ja.innerHTML=Je),jl=p(s),j(ba.$$.fragment,s),bl=p(s),oa=m(s,"P",{"data-svelte-h":!0}),u(oa)!=="svelte-yv5b20"&&(oa.innerHTML=$e),ol=p(s),j(ia.$$.fragment,s),il=p(s),da=m(s,"P",{"data-svelte-h":!0}),u(da)!=="svelte-1jdzrmo"&&(da.innerHTML=ye),dl=p(s),j(fa.$$.fragment,s),fl=p(s),Ma=m(s,"P",{"data-svelte-h":!0}),u(Ma)!=="svelte-yxk2n2"&&(Ma.innerHTML=we),Ml=p(s),j(ga.$$.fragment,s),gl=p(s),Ta=m(s,"P",{"data-svelte-h":!0}),u(Ta)!=="svelte-q7mrw9"&&(Ta.innerHTML=_e),Tl=p(s),j(Ja.$$.fragment,s),Jl=p(s),$a=m(s,"OL",{"data-svelte-h":!0}),u($a)!=="svelte-1sp7k8e"&&($a.innerHTML=Ue),$l=p(s),j(ya.$$.fragment,s),yl=p(s),q=m(s,"OL",{start:!0,"data-svelte-h":!0}),u(q)!=="svelte-1txaf8x"&&(q.innerHTML=Ie),wl=p(s),j(wa.$$.fragment,s),_l=p(s),_a=m(s,"P",{"data-svelte-h":!0}),u(_a)!=="svelte-17h9wod"&&(_a.innerHTML=ve),Ul=p(s),j(Ua.$$.fragment,s),Il=p(s),va=m(s,"P",{}),He(va).forEach(n),this.h()},h(){_(t,"name","hf:doc:metadata"),_(t,"content",rp),_(G,"start","2"),_(W,"class","flex justify-center"),_(H,"start","2"),_(R,"start","3"),_(X,"start","4"),_(Y,"class","flex justify-center"),_(q,"start","2")},m(s,a){Fe(document.head,t),l(s,f,a),l(s,r,a),l(s,M,a),b($,s,a),l(s,y,a),b(w,s,a),l(s,F,a),l(s,J,a),l(s,ka,a),l(s,L,a),l(s,xa,a),b(k,s,a),l(s,Ca,a),l(s,Q,a),l(s,Za,a),b(E,s,a),l(s,Ga,a),b(A,s,a),l(s,Va,a),b(P,s,a),l(s,Ba,a),l(s,S,a),l(s,Wa,a),b(x,s,a),l(s,Ha,a),l(s,D,a),l(s,za,a),b(K,s,a),l(s,Ra,a),l(s,O,a),l(s,Xa,a),b(ss,s,a),l(s,Ya,a),l(s,as,a),l(s,Na,a),l(s,ns,a),l(s,qa,a),l(s,ls,a),l(s,Fa,a),b(es,s,a),l(s,La,a),l(s,ps,a),l(s,Qa,a),l(s,ts,a),l(s,Ea,a),b(rs,s,a),l(s,Aa,a),b(cs,s,a),l(s,Pa,a),l(s,ms,a),l(s,Sa,a),l(s,us,a),l(s,Da,a),b(hs,s,a),l(s,Ka,a),l(s,js,a),l(s,Oa,a),b(bs,s,a),l(s,sn,a),l(s,os,a),l(s,an,a),l(s,is,a),l(s,nn,a),b(ds,s,a),l(s,ln,a),b(C,s,a),l(s,en,a),b(fs,s,a),l(s,pn,a),l(s,Ms,a),l(s,tn,a),l(s,gs,a),l(s,rn,a),b(Z,s,a),l(s,cn,a),b(Ts,s,a),l(s,mn,a),l(s,Js,a),l(s,un,a),l(s,$s,a),l(s,hn,a),b(ys,s,a),l(s,jn,a),l(s,ws,a),l(s,bn,a),b(_s,s,a),l(s,on,a),l(s,Us,a),l(s,dn,a),l(s,Is,a),l(s,fn,a),l(s,vs,a),l(s,Mn,a),l(s,ks,a),l(s,gn,a),b(xs,s,a),l(s,Tn,a),l(s,G,a),l(s,Jn,a),b(Cs,s,a),l(s,$n,a),l(s,Zs,a),l(s,yn,a),l(s,Gs,a),l(s,wn,a),b(Vs,s,a),l(s,_n,a),l(s,Bs,a),l(s,Un,a),b(Ws,s,a),l(s,In,a),l(s,Hs,a),l(s,vn,a),b(zs,s,a),l(s,kn,a),l(s,Rs,a),l(s,xn,a),b(Xs,s,a),l(s,Cn,a),l(s,Ys,a),l(s,Zn,a),b(Ns,s,a),l(s,Gn,a),l(s,qs,a),l(s,Vn,a),b(Fs,s,a),l(s,Bn,a),b(Ls,s,a),l(s,Wn,a),l(s,Qs,a),l(s,Hn,a),b(V,s,a),l(s,zn,a),l(s,Es,a),l(s,Rn,a),b(B,s,a),l(s,Xn,a),b(As,s,a),l(s,Yn,a),l(s,Ps,a),l(s,Nn,a),b(Ss,s,a),l(s,qn,a),l(s,W,a),l(s,Fn,a),l(s,Ds,a),l(s,Ln,a),b(Ks,s,a),l(s,Qn,a),l(s,Os,a),l(s,En,a),l(s,sa,a),l(s,An,a),b(aa,s,a),l(s,Pn,a),l(s,H,a),l(s,Sn,a),b(na,s,a),l(s,Dn,a),b(z,s,a),l(s,Kn,a),l(s,R,a),l(s,On,a),b(la,s,a),l(s,sl,a),l(s,X,a),l(s,al,a),b(ea,s,a),l(s,nl,a),l(s,pa,a),l(s,ll,a),b(ta,s,a),l(s,el,a),l(s,Y,a),l(s,pl,a),b(N,s,a),l(s,tl,a),b(ra,s,a),l(s,rl,a),l(s,ca,a),l(s,cl,a),b(ma,s,a),l(s,ml,a),b(ua,s,a),l(s,ul,a),l(s,ha,a),l(s,hl,a),l(s,ja,a),l(s,jl,a),b(ba,s,a),l(s,bl,a),l(s,oa,a),l(s,ol,a),b(ia,s,a),l(s,il,a),l(s,da,a),l(s,dl,a),b(fa,s,a),l(s,fl,a),l(s,Ma,a),l(s,Ml,a),b(ga,s,a),l(s,gl,a),l(s,Ta,a),l(s,Tl,a),b(Ja,s,a),l(s,Jl,a),l(s,$a,a),l(s,$l,a),b(ya,s,a),l(s,yl,a),l(s,q,a),l(s,wl,a),b(wa,s,a),l(s,_l,a),l(s,_a,a),l(s,Ul,a),b(Ua,s,a),l(s,Il,a),l(s,va,a),vl=!0},p(s,[a]){const ke={};a&2&&(ke.$$scope={dirty:a,ctx:s}),k.$set(ke);const xe={};a&2&&(xe.$$scope={dirty:a,ctx:s}),x.$set(xe);const Ce={};a&2&&(Ce.$$scope={dirty:a,ctx:s}),C.$set(Ce);const Ze={};a&2&&(Ze.$$scope={dirty:a,ctx:s}),Z.$set(Ze);const Ge={};a&2&&(Ge.$$scope={dirty:a,ctx:s}),V.$set(Ge);const Ve={};a&2&&(Ve.$$scope={dirty:a,ctx:s}),B.$set(Ve);const Be={};a&2&&(Be.$$scope={dirty:a,ctx:s}),z.$set(Be);const We={};a&2&&(We.$$scope={dirty:a,ctx:s}),N.$set(We)},i(s){vl||(o($.$$.fragment,s),o(w.$$.fragment,s),o(k.$$.fragment,s),o(E.$$.fragment,s),o(A.$$.fragment,s),o(P.$$.fragment,s),o(x.$$.fragment,s),o(K.$$.fragment,s),o(ss.$$.fragment,s),o(es.$$.fragment,s),o(rs.$$.fragment,s),o(cs.$$.fragment,s),o(hs.$$.fragment,s),o(bs.$$.fragment,s),o(ds.$$.fragment,s),o(C.$$.fragment,s),o(fs.$$.fragment,s),o(Z.$$.fragment,s),o(Ts.$$.fragment,s),o(ys.$$.fragment,s),o(_s.$$.fragment,s),o(xs.$$.fragment,s),o(Cs.$$.fragment,s),o(Vs.$$.fragment,s),o(Ws.$$.fragment,s),o(zs.$$.fragment,s),o(Xs.$$.fragment,s),o(Ns.$$.fragment,s),o(Fs.$$.fragment,s),o(Ls.$$.fragment,s),o(V.$$.fragment,s),o(B.$$.fragment,s),o(As.$$.fragment,s),o(Ss.$$.fragment,s),o(Ks.$$.fragment,s),o(aa.$$.fragment,s),o(na.$$.fragment,s),o(z.$$.fragment,s),o(la.$$.fragment,s),o(ea.$$.fragment,s),o(ta.$$.fragment,s),o(N.$$.fragment,s),o(ra.$$.fragment,s),o(ma.$$.fragment,s),o(ua.$$.fragment,s),o(ba.$$.fragment,s),o(ia.$$.fragment,s),o(fa.$$.fragment,s),o(ga.$$.fragment,s),o(Ja.$$.fragment,s),o(ya.$$.fragment,s),o(wa.$$.fragment,s),o(Ua.$$.fragment,s),vl=!0)},o(s){i($.$$.fragment,s),i(w.$$.fragment,s),i(k.$$.fragment,s),i(E.$$.fragment,s),i(A.$$.fragment,s),i(P.$$.fragment,s),i(x.$$.fragment,s),i(K.$$.fragment,s),i(ss.$$.fragment,s),i(es.$$.fragment,s),i(rs.$$.fragment,s),i(cs.$$.fragment,s),i(hs.$$.fragment,s),i(bs.$$.fragment,s),i(ds.$$.fragment,s),i(C.$$.fragment,s),i(fs.$$.fragment,s),i(Z.$$.fragment,s),i(Ts.$$.fragment,s),i(ys.$$.fragment,s),i(_s.$$.fragment,s),i(xs.$$.fragment,s),i(Cs.$$.fragment,s),i(Vs.$$.fragment,s),i(Ws.$$.fragment,s),i(zs.$$.fragment,s),i(Xs.$$.fragment,s),i(Ns.$$.fragment,s),i(Fs.$$.fragment,s),i(Ls.$$.fragment,s),i(V.$$.fragment,s),i(B.$$.fragment,s),i(As.$$.fragment,s),i(Ss.$$.fragment,s),i(Ks.$$.fragment,s),i(aa.$$.fragment,s),i(na.$$.fragment,s),i(z.$$.fragment,s),i(la.$$.fragment,s),i(ea.$$.fragment,s),i(ta.$$.fragment,s),i(N.$$.fragment,s),i(ra.$$.fragment,s),i(ma.$$.fragment,s),i(ua.$$.fragment,s),i(ba.$$.fragment,s),i(ia.$$.fragment,s),i(fa.$$.fragment,s),i(ga.$$.fragment,s),i(Ja.$$.fragment,s),i(ya.$$.fragment,s),i(wa.$$.fragment,s),i(Ua.$$.fragment,s),vl=!1},d(s){s&&(n(f),n(r),n(M),n(y),n(F),n(J),n(ka),n(L),n(xa),n(Ca),n(Q),n(Za),n(Ga),n(Va),n(Ba),n(S),n(Wa),n(Ha),n(D),n(za),n(Ra),n(O),n(Xa),n(Ya),n(as),n(Na),n(ns),n(qa),n(ls),n(Fa),n(La),n(ps),n(Qa),n(ts),n(Ea),n(Aa),n(Pa),n(ms),n(Sa),n(us),n(Da),n(Ka),n(js),n(Oa),n(sn),n(os),n(an),n(is),n(nn),n(ln),n(en),n(pn),n(Ms),n(tn),n(gs),n(rn),n(cn),n(mn),n(Js),n(un),n($s),n(hn),n(jn),n(ws),n(bn),n(on),n(Us),n(dn),n(Is),n(fn),n(vs),n(Mn),n(ks),n(gn),n(Tn),n(G),n(Jn),n($n),n(Zs),n(yn),n(Gs),n(wn),n(_n),n(Bs),n(Un),n(In),n(Hs),n(vn),n(kn),n(Rs),n(xn),n(Cn),n(Ys),n(Zn),n(Gn),n(qs),n(Vn),n(Bn),n(Wn),n(Qs),n(Hn),n(zn),n(Es),n(Rn),n(Xn),n(Yn),n(Ps),n(Nn),n(qn),n(W),n(Fn),n(Ds),n(Ln),n(Qn),n(Os),n(En),n(sa),n(An),n(Pn),n(H),n(Sn),n(Dn),n(Kn),n(R),n(On),n(sl),n(X),n(al),n(nl),n(pa),n(ll),n(el),n(Y),n(pl),n(tl),n(rl),n(ca),n(cl),n(ml),n(ul),n(ha),n(hl),n(ja),n(jl),n(bl),n(oa),n(ol),n(il),n(da),n(dl),n(fl),n(Ma),n(Ml),n(gl),n(Ta),n(Tl),n(Jl),n($a),n($l),n(yl),n(q),n(wl),n(_l),n(_a),n(Ul),n(Il),n(va)),n(t),d($,s),d(w,s),d(k,s),d(E,s),d(A,s),d(P,s),d(x,s),d(K,s),d(ss,s),d(es,s),d(rs,s),d(cs,s),d(hs,s),d(bs,s),d(ds,s),d(C,s),d(fs,s),d(Z,s),d(Ts,s),d(ys,s),d(_s,s),d(xs,s),d(Cs,s),d(Vs,s),d(Ws,s),d(zs,s),d(Xs,s),d(Ns,s),d(Fs,s),d(Ls,s),d(V,s),d(B,s),d(As,s),d(Ss,s),d(Ks,s),d(aa,s),d(na,s),d(z,s),d(la,s),d(ea,s),d(ta,s),d(N,s),d(ra,s),d(ma,s),d(ua,s),d(ba,s),d(ia,s),d(fa,s),d(ga,s),d(Ja,s),d(ya,s),d(wa,s),d(Ua,s)}}}const rp='{"title":"预处理","local":"预处理","sections":[{"title":"自然语言处理","local":"自然语言处理","sections":[{"title":"填充","local":"填充","sections":[],"depth":3},{"title":"截断","local":"截断","sections":[],"depth":3},{"title":"构建张量","local":"构建张量","sections":[],"depth":3}],"depth":2},{"title":"音频","local":"音频","sections":[],"depth":2},{"title":"计算机视觉","local":"计算机视觉","sections":[{"title":"填充","local":"填充","sections":[],"depth":3}],"depth":2},{"title":"多模态","local":"多模态","sections":[],"depth":2}],"depth":1}';function cp(T){return Xe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class fp extends Ye{constructor(t){super(),Ne(this,t,cp,tp,Re,{})}}export{fp as component};
