import{S as jp,i as kp,s as Ep,e as i,k as m,w as g,t as a,M as vp,c,d as s,m as _,x as T,a as u,h as o,b as F,N as Kl,G as t,g as p,y as C,o as j,p as pe,q as k,B as P,v as wp,n as ie}from"../../chunks/vendor-hf-doc-builder.js";import{T as bp}from"../../chunks/Tip-hf-doc-builder.js";import{Y as hp}from"../../chunks/Youtube-hf-doc-builder.js";import{C as I}from"../../chunks/CodeBlock-hf-doc-builder.js";import{C as $p}from"../../chunks/CourseFloatingBanner-hf-doc-builder.js";import{F as yp}from"../../chunks/FrameworkSwitchCourse-hf-doc-builder.js";import"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function gp(v){let l,f;return l=new $p({props:{chapter:2,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/zh-CN/chapter2/section2_tf.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/zh-CN/chapter2/section2_tf.ipynb"}]}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Tp(v){let l,f;return l=new $p({props:{chapter:2,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/zh-CN/chapter2/section2_pt.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/zh-CN/chapter2/section2_pt.ipynb"}]}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Cp(v){let l;return{c(){l=a("\u8FD9\u662F\u7B2C\u4E00\u90E8\u5206\uFF0C\u6839\u636E\u60A8\u4F7F\u7528PyTorch\u6216\u8005TensorFlow\uFF0C\u5185\u5BB9\u7565\u6709\u4E0D\u540C\u3002\u70B9\u51FB\u6807\u9898\u4E0A\u65B9\u7684\u5E73\u53F0\uFF0C\u9009\u62E9\u60A8\u559C\u6B22\u7684\u5E73\u53F0\uFF01")},l(f){l=o(f,"\u8FD9\u662F\u7B2C\u4E00\u90E8\u5206\uFF0C\u6839\u636E\u60A8\u4F7F\u7528PyTorch\u6216\u8005TensorFlow\uFF0C\u5185\u5BB9\u7565\u6709\u4E0D\u540C\u3002\u70B9\u51FB\u6807\u9898\u4E0A\u65B9\u7684\u5E73\u53F0\uFF0C\u9009\u62E9\u60A8\u559C\u6B22\u7684\u5E73\u53F0\uFF01")},m(f,n){p(f,l,n)},d(f){f&&s(l)}}}function Pp(v){let l,f;return l=new hp({props:{id:"wVN12smEvqg"}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Mp(v){let l,f;return l=new hp({props:{id:"1pedAIvTWXk"}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Fp(v){let l,f;return l=new I({props:{code:`raw_inputs = [
    "I've been waiting for a HuggingFace course my whole life.",
    "I hate this so much!",
]
inputs = tokenizer(raw_inputs, padding=True, truncation=True, return_tensors="tf")
print(inputs)`,highlighted:`raw_inputs = [
    <span class="hljs-string">&quot;I&#x27;ve been waiting for a HuggingFace course my whole life.&quot;</span>,
    <span class="hljs-string">&quot;I hate this so much!&quot;</span>,
]
inputs = tokenizer(raw_inputs, 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-built_in">print</span>(inputs)`}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Ap(v){let l,f;return l=new I({props:{code:`raw_inputs = [
    "I've been waiting for a HuggingFace course my whole life.",
    "I hate this so much!",
]
inputs = tokenizer(raw_inputs, padding=True, truncation=True, return_tensors="pt")
print(inputs)`,highlighted:`raw_inputs = [
    <span class="hljs-string">&quot;I&#x27;ve been waiting for a HuggingFace course my whole life.&quot;</span>,
    <span class="hljs-string">&quot;I hate this so much!&quot;</span>,
]
inputs = tokenizer(raw_inputs, 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-built_in">print</span>(inputs)`}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function xp(v){let l,f,n,d,b;return d=new I({props:{code:`{
    'input_ids': <tf.Tensor: shape=(2, 16), dtype=int32, numpy=
        array([
            [  101,  1045,  1005,  2310,  2042,  3403,  2005,  1037, 17662, 12172,  2607,  2026,  2878,  2166,  1012,   102],
            [  101,  1045,  5223,  2023,  2061,  2172,   999,   102,     0,     0,     0,     0,     0,     0,     0,     0]
        ], dtype=int32)>, 
    'attention_mask': <tf.Tensor: shape=(2, 16), dtype=int32, numpy=
        array([
            [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
            [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
        ], dtype=int32)>
}`,highlighted:`{
    <span class="hljs-string">&#x27;input_ids&#x27;</span>: &lt;tf.Tensor: shape=(<span class="hljs-number">2</span>, <span class="hljs-number">16</span>), dtype=int32, numpy=
        array([
            [  <span class="hljs-number">101</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">1005</span>,  <span class="hljs-number">2310</span>,  <span class="hljs-number">2042</span>,  <span class="hljs-number">3403</span>,  <span class="hljs-number">2005</span>,  <span class="hljs-number">1037</span>, <span class="hljs-number">17662</span>, <span class="hljs-number">12172</span>,  <span class="hljs-number">2607</span>,  <span class="hljs-number">2026</span>,  <span class="hljs-number">2878</span>,  <span class="hljs-number">2166</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>],
            [  <span class="hljs-number">101</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">5223</span>,  <span class="hljs-number">2023</span>,  <span class="hljs-number">2061</span>,  <span class="hljs-number">2172</span>,   <span class="hljs-number">999</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;attention_mask&#x27;</span>: &lt;tf.Tensor: shape=(<span class="hljs-number">2</span>, <span class="hljs-number">16</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">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
            [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">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>, <span class="hljs-number">0</span>]
        ], dtype=int32)&gt;
}`}}),{c(){l=i("p"),f=a("\u4EE5\u4E0B\u662FTensorFlow\u5F20\u91CF\u7684\u7ED3\u679C\uFF1A"),n=m(),g(d.$$.fragment)},l(h){l=c(h,"P",{});var w=u(l);f=o(w,"\u4EE5\u4E0B\u662FTensorFlow\u5F20\u91CF\u7684\u7ED3\u679C\uFF1A"),w.forEach(s),n=_(h),T(d.$$.fragment,h)},m(h,w){p(h,l,w),t(l,f),p(h,n,w),C(d,h,w),b=!0},i(h){b||(k(d.$$.fragment,h),b=!0)},o(h){j(d.$$.fragment,h),b=!1},d(h){h&&s(l),h&&s(n),P(d,h)}}}function Ip(v){let l,f,n,d,b;return d=new I({props:{code:`{
    'input_ids': tensor([
        [  101,  1045,  1005,  2310,  2042,  3403,  2005,  1037, 17662, 12172, 2607,  2026,  2878,  2166,  1012,   102],
        [  101,  1045,  5223,  2023,  2061,  2172,   999,   102,     0,     0,     0,     0,     0,     0,     0,     0]
    ]), 
    'attention_mask': tensor([
        [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
        [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    ])
}`,highlighted:`{
    <span class="hljs-string">&#x27;input_ids&#x27;</span>: tensor([
        [  <span class="hljs-number">101</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">1005</span>,  <span class="hljs-number">2310</span>,  <span class="hljs-number">2042</span>,  <span class="hljs-number">3403</span>,  <span class="hljs-number">2005</span>,  <span class="hljs-number">1037</span>, <span class="hljs-number">17662</span>, <span class="hljs-number">12172</span>, <span class="hljs-number">2607</span>,  <span class="hljs-number">2026</span>,  <span class="hljs-number">2878</span>,  <span class="hljs-number">2166</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>],
        [  <span class="hljs-number">101</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">5223</span>,  <span class="hljs-number">2023</span>,  <span class="hljs-number">2061</span>,  <span class="hljs-number">2172</span>,   <span class="hljs-number">999</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;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">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
        [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">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>, <span class="hljs-number">0</span>]
    ])
}`}}),{c(){l=i("p"),f=a("\u4EE5\u4E0B\u662FPyTorch\u5F20\u91CF\u7684\u7ED3\u679C\uFF1A"),n=m(),g(d.$$.fragment)},l(h){l=c(h,"P",{});var w=u(l);f=o(w,"\u4EE5\u4E0B\u662FPyTorch\u5F20\u91CF\u7684\u7ED3\u679C\uFF1A"),w.forEach(s),n=_(h),T(d.$$.fragment,h)},m(h,w){p(h,l,w),t(l,f),p(h,n,w),C(d,h,w),b=!0},i(h){b||(k(d.$$.fragment,h),b=!0)},o(h){j(d.$$.fragment,h),b=!1},d(h){h&&s(l),h&&s(n),P(d,h)}}}function qp(v){let l,f,n,d,b,h,w,A,M,y,x;return y=new I({props:{code:`from transformers import TFAutoModel

checkpoint = "distilbert-base-uncased-finetuned-sst-2-english"
model = TFAutoModel.from_pretrained(checkpoint)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModel

checkpoint = <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>
model = TFAutoModel.from_pretrained(checkpoint)`}}),{c(){l=i("p"),f=a("\u6211\u4EEC\u53EF\u4EE5\u50CF\u4F7F\u7528\u6807\u8BB0\u5668\u4E00\u6837\u4E0B\u8F7D\u9884\u8BAD\u7EC3\u6A21\u578B\u3002\u{1F917} Transformers\u63D0\u4F9B\u4E86\u4E00\u4E2A"),n=i("code"),d=a("TFAutoModel"),b=a("\u7C7B\uFF0C\u8BE5\u7C7B\u8FD8\u5177\u6709"),h=i("code"),w=a("from_pretrained()"),A=a("\u65B9\u6CD5\uFF1A"),M=m(),g(y.$$.fragment)},l($){l=c($,"P",{});var E=u(l);f=o(E,"\u6211\u4EEC\u53EF\u4EE5\u50CF\u4F7F\u7528\u6807\u8BB0\u5668\u4E00\u6837\u4E0B\u8F7D\u9884\u8BAD\u7EC3\u6A21\u578B\u3002\u{1F917} Transformers\u63D0\u4F9B\u4E86\u4E00\u4E2A"),n=c(E,"CODE",{});var q=u(n);d=o(q,"TFAutoModel"),q.forEach(s),b=o(E,"\u7C7B\uFF0C\u8BE5\u7C7B\u8FD8\u5177\u6709"),h=c(E,"CODE",{});var S=u(h);w=o(S,"from_pretrained()"),S.forEach(s),A=o(E,"\u65B9\u6CD5\uFF1A"),E.forEach(s),M=_($),T(y.$$.fragment,$)},m($,E){p($,l,E),t(l,f),t(l,n),t(n,d),t(l,b),t(l,h),t(h,w),t(l,A),p($,M,E),C(y,$,E),x=!0},i($){x||(k(y.$$.fragment,$),x=!0)},o($){j(y.$$.fragment,$),x=!1},d($){$&&s(l),$&&s(M),P(y,$)}}}function Dp(v){let l,f,n,d,b,h,w,A,M,y,x;return y=new I({props:{code:`from transformers import AutoModel

checkpoint = "distilbert-base-uncased-finetuned-sst-2-english"
model = AutoModel.from_pretrained(checkpoint)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModel

checkpoint = <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>
model = AutoModel.from_pretrained(checkpoint)`}}),{c(){l=i("p"),f=a("\u6211\u4EEC\u53EF\u4EE5\u50CF\u4F7F\u7528\u6807\u8BB0\u5668\u4E00\u6837\u4E0B\u8F7D\u9884\u8BAD\u7EC3\u6A21\u578B\u3002\u{1F917} Transformers\u63D0\u4F9B\u4E86\u4E00\u4E2A"),n=i("code"),d=a("AutoModel"),b=a("\u7C7B\uFF0C\u8BE5\u7C7B\u8FD8\u5177\u6709"),h=i("code"),w=a("from_pretrained()"),A=a("\u65B9\u6CD5\uFF1A"),M=m(),g(y.$$.fragment)},l($){l=c($,"P",{});var E=u(l);f=o(E,"\u6211\u4EEC\u53EF\u4EE5\u50CF\u4F7F\u7528\u6807\u8BB0\u5668\u4E00\u6837\u4E0B\u8F7D\u9884\u8BAD\u7EC3\u6A21\u578B\u3002\u{1F917} Transformers\u63D0\u4F9B\u4E86\u4E00\u4E2A"),n=c(E,"CODE",{});var q=u(n);d=o(q,"AutoModel"),q.forEach(s),b=o(E,"\u7C7B\uFF0C\u8BE5\u7C7B\u8FD8\u5177\u6709"),h=c(E,"CODE",{});var S=u(h);w=o(S,"from_pretrained()"),S.forEach(s),A=o(E,"\u65B9\u6CD5\uFF1A"),E.forEach(s),M=_($),T(y.$$.fragment,$)},m($,E){p($,l,E),t(l,f),t(l,n),t(n,d),t(l,b),t(l,h),t(h,w),t(l,A),p($,M,E),C(y,$,E),x=!0},i($){x||(k(y.$$.fragment,$),x=!0)},o($){j(y.$$.fragment,$),x=!1},d($){$&&s(l),$&&s(M),P(y,$)}}}function Sp(v){let l,f,n,d;return l=new I({props:{code:`outputs = model(inputs)
print(outputs.last_hidden_state.shape)`,highlighted:`outputs = model(inputs)
<span class="hljs-built_in">print</span>(outputs.last_hidden_state.shape)`}}),n=new I({props:{code:"(2, 16, 768)",highlighted:'(<span class="hljs-number">2</span>, <span class="hljs-number">16</span>, <span class="hljs-number">768</span>)'}}),{c(){g(l.$$.fragment),f=m(),g(n.$$.fragment)},l(b){T(l.$$.fragment,b),f=_(b),T(n.$$.fragment,b)},m(b,h){C(l,b,h),p(b,f,h),C(n,b,h),d=!0},i(b){d||(k(l.$$.fragment,b),k(n.$$.fragment,b),d=!0)},o(b){j(l.$$.fragment,b),j(n.$$.fragment,b),d=!1},d(b){P(l,b),b&&s(f),P(n,b)}}}function Op(v){let l,f,n,d;return l=new I({props:{code:`outputs = model(**inputs)
print(outputs.last_hidden_state.shape)`,highlighted:`outputs = model(**inputs)
<span class="hljs-built_in">print</span>(outputs.last_hidden_state.shape)`}}),n=new I({props:{code:"torch.Size([2, 16, 768])",highlighted:'torch.Size([<span class="hljs-number">2</span>, <span class="hljs-number">16</span>, <span class="hljs-number">768</span>])'}}),{c(){g(l.$$.fragment),f=m(),g(n.$$.fragment)},l(b){T(l.$$.fragment,b),f=_(b),T(n.$$.fragment,b)},m(b,h){C(l,b,h),p(b,f,h),C(n,b,h),d=!0},i(b){d||(k(l.$$.fragment,b),k(n.$$.fragment,b),d=!0)},o(b){j(l.$$.fragment,b),j(n.$$.fragment,b),d=!1},d(b){P(l,b),b&&s(f),P(n,b)}}}function Np(v){let l,f,n,d,b,h,w,A,M,y,x;return y=new I({props:{code:`from transformers import TFAutoModelForSequenceClassification

checkpoint = "distilbert-base-uncased-finetuned-sst-2-english"
model = TFAutoModelForSequenceClassification.from_pretrained(checkpoint)
outputs = model(inputs)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForSequenceClassification

checkpoint = <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>
model = TFAutoModelForSequenceClassification.from_pretrained(checkpoint)
outputs = model(inputs)`}}),{c(){l=i("p"),f=a("For our example, we will need a model with a sequence classification head (to be able to classify the sentences as positive or negative). So, we won\u2019t actually use the "),n=i("code"),d=a("TFAutoModel"),b=a(" class, but "),h=i("code"),w=a("TFAutoModelForSequenceClassification"),A=a(":"),M=m(),g(y.$$.fragment)},l($){l=c($,"P",{});var E=u(l);f=o(E,"For our example, we will need a model with a sequence classification head (to be able to classify the sentences as positive or negative). So, we won\u2019t actually use the "),n=c(E,"CODE",{});var q=u(n);d=o(q,"TFAutoModel"),q.forEach(s),b=o(E," class, but "),h=c(E,"CODE",{});var S=u(h);w=o(S,"TFAutoModelForSequenceClassification"),S.forEach(s),A=o(E,":"),E.forEach(s),M=_($),T(y.$$.fragment,$)},m($,E){p($,l,E),t(l,f),t(l,n),t(n,d),t(l,b),t(l,h),t(h,w),t(l,A),p($,M,E),C(y,$,E),x=!0},i($){x||(k(y.$$.fragment,$),x=!0)},o($){j(y.$$.fragment,$),x=!1},d($){$&&s(l),$&&s(M),P(y,$)}}}function Lp(v){let l,f,n,d,b,h,w,A,M,y,x;return y=new I({props:{code:`from transformers import AutoModelForSequenceClassification

checkpoint = "distilbert-base-uncased-finetuned-sst-2-english"
model = AutoModelForSequenceClassification.from_pretrained(checkpoint)
outputs = model(**inputs)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSequenceClassification

checkpoint = <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>
model = AutoModelForSequenceClassification.from_pretrained(checkpoint)
outputs = model(**inputs)`}}),{c(){l=i("p"),f=a("\u5BF9\u4E8E\u6211\u4EEC\u7684\u793A\u4F8B\uFF0C\u6211\u4EEC\u9700\u8981\u4E00\u4E2A\u5E26\u6709\u5E8F\u5217\u5206\u7C7B\u5934\u7684\u6A21\u578B\uFF08\u80FD\u591F\u5C06\u53E5\u5B50\u5206\u7C7B\u4E3A\u80AF\u5B9A\u6216\u5426\u5B9A\uFF09\u3002\u56E0\u6B64\uFF0C\u6211\u4EEC\u5B9E\u9645\u4E0A\u4E0D\u4F1A\u4F7F\u7528"),n=i("code"),d=a("AutoModel"),b=a("\u7C7B\uFF0C\u800C\u662F\u4F7F\u7528"),h=i("code"),w=a("AutoModelForSequenceClassification"),A=a("\uFF1A"),M=m(),g(y.$$.fragment)},l($){l=c($,"P",{});var E=u(l);f=o(E,"\u5BF9\u4E8E\u6211\u4EEC\u7684\u793A\u4F8B\uFF0C\u6211\u4EEC\u9700\u8981\u4E00\u4E2A\u5E26\u6709\u5E8F\u5217\u5206\u7C7B\u5934\u7684\u6A21\u578B\uFF08\u80FD\u591F\u5C06\u53E5\u5B50\u5206\u7C7B\u4E3A\u80AF\u5B9A\u6216\u5426\u5B9A\uFF09\u3002\u56E0\u6B64\uFF0C\u6211\u4EEC\u5B9E\u9645\u4E0A\u4E0D\u4F1A\u4F7F\u7528"),n=c(E,"CODE",{});var q=u(n);d=o(q,"AutoModel"),q.forEach(s),b=o(E,"\u7C7B\uFF0C\u800C\u662F\u4F7F\u7528"),h=c(E,"CODE",{});var S=u(h);w=o(S,"AutoModelForSequenceClassification"),S.forEach(s),A=o(E,"\uFF1A"),E.forEach(s),M=_($),T(y.$$.fragment,$)},m($,E){p($,l,E),t(l,f),t(l,n),t(n,d),t(l,b),t(l,h),t(h,w),t(l,A),p($,M,E),C(y,$,E),x=!0},i($){x||(k(y.$$.fragment,$),x=!0)},o($){j(y.$$.fragment,$),x=!1},d($){$&&s(l),$&&s(M),P(y,$)}}}function zp(v){let l,f;return l=new I({props:{code:"(2, 2)",highlighted:'(<span class="hljs-number">2</span>, <span class="hljs-number">2</span>)'}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Gp(v){let l,f;return l=new I({props:{code:"torch.Size([2, 2])",highlighted:'torch.Size([<span class="hljs-number">2</span>, <span class="hljs-number">2</span>])'}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Hp(v){let l,f;return l=new I({props:{code:`<tf.Tensor: shape=(2, 2), dtype=float32, numpy=
    array([[-1.5606991,  1.6122842],
           [ 4.169231 , -3.3464472]], dtype=float32)>`,highlighted:`&lt;tf.Tensor: shape=(<span class="hljs-number">2</span>, <span class="hljs-number">2</span>), dtype=float32, numpy=
    array([[-<span class="hljs-number">1.5606991</span>,  <span class="hljs-number">1.6122842</span>],
           [ <span class="hljs-number">4.169231</span> , -<span class="hljs-number">3.3464472</span>]], dtype=float32)&gt;`}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Vp(v){let l,f;return l=new I({props:{code:`tensor([[-1.5607,  1.6123],
        [ 4.1692, -3.3464]], grad_fn=<AddmmBackward>)`,highlighted:`tensor([[-<span class="hljs-number">1.5607</span>,  <span class="hljs-number">1.6123</span>],
        [ <span class="hljs-number">4.1692</span>, -<span class="hljs-number">3.3464</span>]], grad_fn=&lt;AddmmBackward&gt;)`}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Bp(v){let l,f;return l=new I({props:{code:`import tensorflow as tf

predictions = tf.math.softmax(outputs.logits, axis=-1)
print(predictions)`,highlighted:`<span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

predictions = tf.math.softmax(outputs.logits, axis=-<span class="hljs-number">1</span>)
<span class="hljs-built_in">print</span>(predictions)`}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Rp(v){let l,f;return l=new I({props:{code:`import torch

predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
print(predictions)`,highlighted:`<span class="hljs-keyword">import</span> torch

predictions = torch.nn.functional.softmax(outputs.logits, dim=-<span class="hljs-number">1</span>)
<span class="hljs-built_in">print</span>(predictions)`}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Up(v){let l,f;return l=new I({props:{code:`tf.Tensor(
[[4.01951671e-02 9.59804833e-01]
 [9.9945587e-01 5.4418424e-04]], shape=(2, 2), dtype=float32)`,highlighted:`tf.Tensor(
[[<span class="hljs-number">4.01951671e-02</span> <span class="hljs-number">9.59804833e-01</span>]
 [<span class="hljs-number">9.9945587e-01</span> <span class="hljs-number">5.4418424e-04</span>]], shape=(<span class="hljs-number">2</span>, <span class="hljs-number">2</span>), dtype=float32)`}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Qp(v){let l,f;return l=new I({props:{code:`tensor([[4.0195e-02, 9.5980e-01],
        [9.9946e-01, 5.4418e-04]], grad_fn=<SoftmaxBackward>)`,highlighted:`tensor([[<span class="hljs-number">4.0195e-02</span>, <span class="hljs-number">9.5980e-01</span>],
        [<span class="hljs-number">9.9946e-01</span>, <span class="hljs-number">5.4418e-04</span>]], grad_fn=&lt;SoftmaxBackward&gt;)`}}),{c(){g(l.$$.fragment)},l(n){T(l.$$.fragment,n)},m(n,d){C(l,n,d),f=!0},i(n){f||(k(l.$$.fragment,n),f=!0)},o(n){j(l.$$.fragment,n),f=!1},d(n){P(l,n)}}}function Yp(v){let l,f,n,d,b;return{c(){l=i("p"),f=a("\u270F\uFE0F "),n=i("strong"),d=a("\u8BD5\u8BD5\u770B\uFF01"),b=a(" \u9009\u62E9\u4E24\u4E2A\uFF08\u6216\u66F4\u591A\uFF09\u4F60\u81EA\u5DF1\u7684\u6587\u672C\u5E76\u5728\u7BA1\u9053\u4E2D\u8FD0\u884C\u5B83\u4EEC\u3002\u7136\u540E\u81EA\u5DF1\u590D\u5236\u5728\u8FD9\u91CC\u770B\u5230\u7684\u6B65\u9AA4\uFF0C\u5E76\u68C0\u67E5\u662F\u5426\u83B7\u5F97\u76F8\u540C\u7684\u7ED3\u679C\uFF01")},l(h){l=c(h,"P",{});var w=u(l);f=o(w,"\u270F\uFE0F "),n=c(w,"STRONG",{});var A=u(n);d=o(A,"\u8BD5\u8BD5\u770B\uFF01"),A.forEach(s),b=o(w," \u9009\u62E9\u4E24\u4E2A\uFF08\u6216\u66F4\u591A\uFF09\u4F60\u81EA\u5DF1\u7684\u6587\u672C\u5E76\u5728\u7BA1\u9053\u4E2D\u8FD0\u884C\u5B83\u4EEC\u3002\u7136\u540E\u81EA\u5DF1\u590D\u5236\u5728\u8FD9\u91CC\u770B\u5230\u7684\u6B65\u9AA4\uFF0C\u5E76\u68C0\u67E5\u662F\u5426\u83B7\u5F97\u76F8\u540C\u7684\u7ED3\u679C\uFF01"),w.forEach(s)},m(h,w){p(h,l,w),t(l,f),t(l,n),t(n,d),t(l,b)},d(h){h&&s(l)}}}function Jp(v){let l,f,n,d,b,h,w,A,M,y,x,$,E,q,S,je,Zl,ms,en,sn,Wt,Se,Xt,_s,tn,Kt,Oe,Zt,ke,ln,ds,nn,rn,el,he,Ne,Ma,an,Le,Fa,sl,bs,on,tl,ze,pn,ll,Ee,cn,st,fn,un,nl,ce,Ge,mn,tt,_n,dn,bn,lt,hn,$n,nt,jn,rl,z,kn,He,En,vn,rt,wn,yn,at,gn,Tn,al,G,Cn,ot,Pn,Mn,pt,Fn,An,Ve,xn,In,ol,Be,pl,hs,qn,il,ve,Dn,it,Sn,On,cl,we,Nn,ct,Ln,zn,fl,B,R,$s,js,Gn,ul,U,Q,ks,N,Hn,ft,Vn,Bn,ut,Rn,Un,mt,Qn,Yn,_t,Jn,Wn,ml,Re,Xn,_l,Y,J,Es,vs,Kn,dl,H,Zn,dt,er,sr,bt,tr,lr,ht,nr,rr,bl,ws,ar,hl,fe,or,$t,pr,ir,ys,cr,fr,$l,Ue,ur,jl,gs,mr,kl,ue,Ts,jt,_r,dr,br,Cs,kt,hr,$r,jr,Ps,Et,kr,Er,El,Ms,vr,vl,Fs,wr,wl,W,X,As,V,yr,vt,gr,Tr,wt,Cr,Pr,yt,Mr,Fr,yl,Qe,Ar,gl,xs,xr,Tl,$e,Ye,Aa,Ir,Je,xa,Cl,Is,qr,Pl,qs,Dr,Ml,Ds,Sr,Fl,D,Ss,gt,Or,Nr,Lr,Tt,Ct,zr,Gr,Pt,Mt,Hr,Vr,Ft,At,Br,Rr,xt,It,Ur,Qr,qt,Dt,Yr,Jr,St,Ot,Wr,Xr,Nt,Kr,Al,K,Z,Os,Ns,Zr,xl,We,Il,ee,se,Ls,zs,ea,ql,Xe,sa,Dl,Gs,ta,Sl,Ke,Ol,te,le,Hs,L,la,Lt,na,ra,zt,aa,oa,Gt,pa,ia,Ze,ca,fa,Nl,ne,re,Vs,ae,oe,Bs,me,ua,Ht,ma,_a,Vt,da,ba,Ll,ye,ha,Bt,$a,ja,zl,es,Gl,ss,Hl,Rs,ka,Vl,ge,Rt,Ea,va,Ut,wa,Bl,Us,ya,Rl,Te,Ul;n=new yp({props:{fw:v[0]}});const Ia=[Tp,gp],ts=[];function qa(e,r){return e[0]==="pt"?0:1}A=qa(v),M=ts[A]=Ia[A](v),x=new bp({props:{$$slots:{default:[Cp]},$$scope:{ctx:v}}});const Da=[Mp,Pp],ls=[];function Sa(e,r){return e[0]==="pt"?0:1}E=Sa(v),q=ls[E]=Da[E](v),Se=new I({props:{code:`from transformers import pipeline

classifier = pipeline("sentiment-analysis")
classifier(
    [
        "I've been waiting for a HuggingFace course my whole life.",
        "I hate this so much!",
    ]
)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

classifier = pipeline(<span class="hljs-string">&quot;sentiment-analysis&quot;</span>)
classifier(
    [
        <span class="hljs-string">&quot;I&#x27;ve been waiting for a HuggingFace course my whole life.&quot;</span>,
        <span class="hljs-string">&quot;I hate this so much!&quot;</span>,
    ]
)`}}),Oe=new I({props:{code:`[{'label': 'POSITIVE', 'score': 0.9598047137260437},
 {'label': 'NEGATIVE', 'score': 0.9994558095932007}]`,highlighted:`[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;POSITIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9598047137260437</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;NEGATIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9994558095932007</span>}]`}}),Be=new I({props:{code:`from transformers import AutoTokenizer

checkpoint = "distilbert-base-uncased-finetuned-sst-2-english"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

checkpoint = <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>
tokenizer = AutoTokenizer.from_pretrained(checkpoint)`}});const Oa=[Ap,Fp],ns=[];function Na(e,r){return e[0]==="pt"?0:1}B=Na(v),R=ns[B]=Oa[B](v);const La=[Ip,xp],rs=[];function za(e,r){return e[0]==="pt"?0:1}U=za(v),Q=rs[U]=La[U](v);const Ga=[Dp,qp],as=[];function Ha(e,r){return e[0]==="pt"?0:1}Y=Ha(v),J=as[Y]=Ga[Y](v);const Va=[Op,Sp],os=[];function Ba(e,r){return e[0]==="pt"?0:1}W=Ba(v),X=os[W]=Va[W](v);const Ra=[Lp,Np],ps=[];function Ua(e,r){return e[0]==="pt"?0:1}K=Ua(v),Z=ps[K]=Ra[K](v),We=new I({props:{code:"print(outputs.logits.shape)",highlighted:'<span class="hljs-built_in">print</span>(outputs.logits.shape)'}});const Qa=[Gp,zp],is=[];function Ya(e,r){return e[0]==="pt"?0:1}ee=Ya(v),se=is[ee]=Qa[ee](v),Ke=new I({props:{code:"print(outputs.logits)",highlighted:'<span class="hljs-built_in">print</span>(outputs.logits)'}});const Ja=[Vp,Hp],cs=[];function Wa(e,r){return e[0]==="pt"?0:1}te=Wa(v),le=cs[te]=Ja[te](v);const Xa=[Rp,Bp],fs=[];function Ka(e,r){return e[0]==="pt"?0:1}ne=Ka(v),re=fs[ne]=Xa[ne](v);const Za=[Qp,Up],us=[];function eo(e,r){return e[0]==="pt"?0:1}return ae=eo(v),oe=us[ae]=Za[ae](v),es=new I({props:{code:"model.config.id2label",highlighted:"model.config.id2label"}}),ss=new I({props:{code:"{0: 'NEGATIVE', 1: 'POSITIVE'}",highlighted:'{<span class="hljs-number">0</span>: <span class="hljs-string">&#x27;NEGATIVE&#x27;</span>, <span class="hljs-number">1</span>: <span class="hljs-string">&#x27;POSITIVE&#x27;</span>}'}}),Te=new bp({props:{$$slots:{default:[Yp]},$$scope:{ctx:v}}}),{c(){l=i("meta"),f=m(),g(n.$$.fragment),d=m(),b=i("h1"),h=a("\u7BA1\u9053\u7684\u5185\u90E8"),w=m(),M.c(),y=m(),g(x.$$.fragment),$=m(),q.c(),S=m(),je=i("p"),Zl=a("\u8BA9\u6211\u4EEC\u4ECE\u4E00\u4E2A\u5B8C\u6574\u7684\u793A\u4F8B\u5F00\u59CB\uFF0C\u770B\u770B\u5728"),ms=i("a"),en=a("Chapter 1"),sn=a("\u4E2D\u6267\u884C\u4EE5\u4E0B\u4EE3\u7801\u65F6\u5728\u5E55\u540E\u53D1\u751F\u4E86\u4EC0\u4E48"),Wt=m(),g(Se.$$.fragment),Xt=m(),_s=i("p"),tn=a("\u83B7\u5F97:"),Kt=m(),g(Oe.$$.fragment),Zt=m(),ke=i("p"),ln=a("\u6B63\u5982\u6211\u4EEC\u5728"),ds=i("a"),nn=a("Chapter 1"),rn=a("\u4E2D\u770B\u5230\u7684\uFF0C\u6B64\u7BA1\u9053\u5C06\u4E09\u4E2A\u6B65\u9AA4\u7EC4\u5408\u5728\u4E00\u8D77\uFF1A\u9884\u5904\u7406\u3001\u901A\u8FC7\u6A21\u578B\u4F20\u9012\u8F93\u5165\u548C\u540E\u5904\u7406\uFF1A"),el=m(),he=i("div"),Ne=i("img"),an=m(),Le=i("img"),sl=m(),bs=i("p"),on=a("\u8BA9\u6211\u4EEC\u5FEB\u901F\u6D4F\u89C8\u4E00\u4E0B\u8FD9\u4E9B\u5185\u5BB9\u3002"),tl=m(),ze=i("h2"),pn=a("\u4F7F\u7528\u5206\u8BCD\u5668\u8FDB\u884C\u9884\u5904\u7406"),ll=m(),Ee=i("p"),cn=a("\u4E0E\u5176\u4ED6\u795E\u7ECF\u7F51\u7EDC\u4E00\u6837\uFF0CTransformer\u6A21\u578B\u65E0\u6CD5\u76F4\u63A5\u5904\u7406\u539F\u59CB\u6587\u672C\uFF0C \u56E0\u6B64\u6211\u4EEC\u7BA1\u9053\u7684\u7B2C\u4E00\u6B65\u662F\u5C06\u6587\u672C\u8F93\u5165\u8F6C\u6362\u4E3A\u6A21\u578B\u80FD\u591F\u7406\u89E3\u7684\u6570\u5B57\u3002 \u4E3A\u6B64\uFF0C\u6211\u4EEC\u4F7F\u7528"),st=i("em"),fn=a("tokenizer"),un=a("(\u6807\u8BB0\u5668)\uFF0C\u8D1F\u8D23\uFF1A"),nl=m(),ce=i("ul"),Ge=i("li"),mn=a("\u5C06\u8F93\u5165\u62C6\u5206\u4E3A\u5355\u8BCD\u3001\u5B50\u5355\u8BCD\u6216\u7B26\u53F7\uFF08\u5982\u6807\u70B9\u7B26\u53F7\uFF09\uFF0C\u79F0\u4E3A\u6807\u8BB0("),tt=i("em"),_n=a("token"),dn=a(")"),bn=m(),lt=i("li"),hn=a("\u5C06\u6BCF\u4E2A\u6807\u8BB0(token)\u6620\u5C04\u5230\u4E00\u4E2A\u6574\u6570"),$n=m(),nt=i("li"),jn=a("\u6DFB\u52A0\u53EF\u80FD\u5BF9\u6A21\u578B\u6709\u7528\u7684\u5176\u4ED6\u8F93\u5165"),rl=m(),z=i("p"),kn=a("\u6240\u6709\u8FD9\u4E9B\u9884\u5904\u7406\u90FD\u9700\u8981\u4EE5\u4E0E\u6A21\u578B\u9884\u8BAD\u7EC3\u65F6\u5B8C\u5168\u76F8\u540C\u7684\u65B9\u5F0F\u5B8C\u6210\uFF0C\u56E0\u6B64\u6211\u4EEC\u9996\u5148\u9700\u8981\u4ECE"),He=i("a"),En=a("Model Hub"),vn=a("\u4E2D\u4E0B\u8F7D\u8FD9\u4E9B\u4FE1\u606F\u3002\u4E3A\u6B64\uFF0C\u6211\u4EEC\u4F7F\u7528"),rt=i("code"),wn=a("AutoTokenizer"),yn=a("\u7C7B\u53CA\u5176"),at=i("code"),gn=a("from_pretrained()"),Tn=a("\u65B9\u6CD5\u3002\u4F7F\u7528\u6211\u4EEC\u6A21\u578B\u7684\u68C0\u67E5\u70B9\u540D\u79F0\uFF0C\u5B83\u5C06\u81EA\u52A8\u83B7\u53D6\u4E0E\u6A21\u578B\u7684\u6807\u8BB0\u5668\u76F8\u5173\u8054\u7684\u6570\u636E\uFF0C\u5E76\u5BF9\u5176\u8FDB\u884C\u7F13\u5B58\uFF08\u56E0\u6B64\u53EA\u6709\u5728\u60A8\u7B2C\u4E00\u6B21\u8FD0\u884C\u4E0B\u9762\u7684\u4EE3\u7801\u65F6\u624D\u4F1A\u4E0B\u8F7D\uFF09\u3002"),al=m(),G=i("p"),Cn=a("\u56E0\u4E3A"),ot=i("code"),Pn=a("sentiment-analysis"),Mn=a("\uFF08\u60C5\u7EEA\u5206\u6790\uFF09\u7BA1\u9053\u7684\u9ED8\u8BA4\u68C0\u67E5\u70B9\u662F"),pt=i("code"),Fn=a("distilbert-base-uncased-finetuned-sst-2-english"),An=a("\uFF08\u4F60\u53EF\u4EE5\u770B\u5230\u5B83\u7684\u6A21\u578B\u5361"),Ve=i("a"),xn=a("here"),In=a(")\uFF0C\u6211\u4EEC\u8FD0\u884C\u4EE5\u4E0B\u7A0B\u5E8F\uFF1A"),ol=m(),g(Be.$$.fragment),pl=m(),hs=i("p"),qn=a("\u4E00\u65E6\u6211\u4EEC\u6709\u4E86\u6807\u8BB0\u5668\uFF0C\u6211\u4EEC\u5C31\u53EF\u4EE5\u76F4\u63A5\u5C06\u6211\u4EEC\u7684\u53E5\u5B50\u4F20\u9012\u7ED9\u5B83\uFF0C\u7136\u540E\u6211\u4EEC\u5C31\u4F1A\u5F97\u5230\u4E00\u672C\u5B57\u5178\uFF0C\u5B83\u53EF\u4EE5\u63D0\u4F9B\u7ED9\u6211\u4EEC\u7684\u6A21\u578B\uFF01\u5269\u4E0B\u8981\u505A\u7684\u552F\u4E00\u4E00\u4EF6\u4E8B\u5C31\u662F\u5C06\u8F93\u5165ID\u5217\u8868\u8F6C\u6362\u4E3A\u5F20\u91CF\u3002"),il=m(),ve=i("p"),Dn=a("\u60A8\u53EF\u4EE5\u4F7F\u7528\u{1F917} Transformers\uFF0C\u800C\u4E0D\u5FC5\u62C5\u5FC3\u54EA\u4E2AML\u6846\u67B6\u88AB\u7528\u4F5C\u540E\u7AEF\uFF1B\u5B83\u53EF\u80FD\u662FPyTorch\u6216TensorFlow\uFF0C\u6216Flax\u3002\u4F46\u662F\uFF0CTransformers\u578B\u53F7\u53EA\u63A5\u53D7"),it=i("em"),Sn=a("\u5F20\u91CF"),On=a("\u4F5C\u4E3A\u8F93\u5165\u3002\u5982\u679C\u8FD9\u662F\u4F60\u7B2C\u4E00\u6B21\u542C\u8BF4\u5F20\u91CF\uFF0C\u4F60\u53EF\u4EE5\u628A\u5B83\u4EEC\u60F3\u8C61\u6210NumPy\u6570\u7EC4\u3002NumPy\u6570\u7EC4\u53EF\u4EE5\u662F\u6807\u91CF\uFF080D\uFF09\u3001\u5411\u91CF\uFF081D\uFF09\u3001\u77E9\u9635\uFF082D\uFF09\u6216\u5177\u6709\u66F4\u591A\u7EF4\u5EA6\u3002\u5B83\u5B9E\u9645\u4E0A\u662F\u5F20\u91CF\uFF1B\u5176\u4ED6ML\u6846\u67B6\u7684\u5F20\u91CF\u884C\u4E3A\u7C7B\u4F3C\uFF0C\u901A\u5E38\u4E0ENumPy\u6570\u7EC4\u4E00\u6837\u6613\u4E8E\u5B9E\u4F8B\u5316\u3002"),cl=m(),we=i("p"),Nn=a("\u8981\u6307\u5B9A\u8981\u8FD4\u56DE\u7684\u5F20\u91CF\u7C7B\u578B\uFF08PyTorch\u3001TensorFlow\u6216plain NumPy\uFF09\uFF0C\u6211\u4EEC\u4F7F\u7528"),ct=i("code"),Ln=a("return_tensors"),zn=a("\u53C2\u6570\uFF1A"),fl=m(),R.c(),$s=m(),js=i("p"),Gn=a("\u73B0\u5728\u4E0D\u8981\u62C5\u5FC3\u586B\u5145\u548C\u622A\u65AD\uFF1B\u6211\u4EEC\u7A0D\u540E\u4F1A\u89E3\u91CA\u8FD9\u4E9B\u3002\u8FD9\u91CC\u8981\u8BB0\u4F4F\u7684\u4E3B\u8981\u4E8B\u60C5\u662F\uFF0C\u60A8\u53EF\u4EE5\u4F20\u9012\u4E00\u4E2A\u53E5\u5B50\u6216\u4E00\u7EC4\u53E5\u5B50\uFF0C\u8FD8\u53EF\u4EE5\u6307\u5B9A\u8981\u8FD4\u56DE\u7684\u5F20\u91CF\u7C7B\u578B\uFF08\u5982\u679C\u6CA1\u6709\u4F20\u9012\u7C7B\u578B\uFF0C\u60A8\u5C06\u5F97\u5230\u4E00\u7EC4\u5217\u8868\uFF09\u3002"),ul=m(),Q.c(),ks=m(),N=i("p"),Hn=a("\u8F93\u51FA\u672C\u8EAB\u662F\u4E00\u4E2A\u5305\u542B\u4E24\u4E2A\u952E\u7684\u5B57\u5178\uFF0C"),ft=i("code"),Vn=a("input_ids"),Bn=a("\u548C"),ut=i("code"),Rn=a("attention_mask"),Un=a("\u3002"),mt=i("code"),Qn=a("input_ids"),Yn=a("\u5305\u542B\u4E24\u884C\u6574\u6570\uFF08\u6BCF\u4E2A\u53E5\u5B50\u4E00\u884C\uFF09\uFF0C\u5B83\u4EEC\u662F\u6BCF\u4E2A\u53E5\u5B50\u4E2D\u6807\u8BB0\u7684\u552F\u4E00\u6807\u8BB0\uFF08token\uFF09\u3002\u6211\u4EEC\u5C06\u5728\u672C\u7AE0\u540E\u9762\u89E3\u91CA\u4EC0\u4E48\u662F"),_t=i("code"),Jn=a("attention_mask"),Wn=a("\u3002"),ml=m(),Re=i("h2"),Xn=a("\u6D4F\u89C8\u6A21\u578B"),_l=m(),J.c(),Es=m(),vs=i("p"),Kn=a("\u5728\u8FD9\u4E2A\u4EE3\u7801\u7247\u6BB5\u4E2D\uFF0C\u6211\u4EEC\u4E0B\u8F7D\u4E86\u4E4B\u524D\u5728\u7BA1\u9053\u4E2D\u4F7F\u7528\u7684\u76F8\u540C\u68C0\u67E5\u70B9\uFF08\u5B83\u5B9E\u9645\u4E0A\u5E94\u8BE5\u5DF2\u7ECF\u88AB\u7F13\u5B58\uFF09\uFF0C\u5E76\u7528\u5B83\u5B9E\u4F8B\u5316\u4E86\u4E00\u4E2A\u6A21\u578B\u3002"),dl=m(),H=i("p"),Zn=a("\u8FD9\u4E2A\u67B6\u6784\u53EA\u5305\u542B\u57FA\u672C\u8F6C\u6362\u5668\u6A21\u5757\uFF1A\u7ED9\u5B9A\u4E00\u4E9B\u8F93\u5165\uFF0C\u5B83\u8F93\u51FA\u6211\u4EEC\u5C06\u8C03\u7528\u7684\u5185\u5BB9"),dt=i("em"),er=a("\u9690\u85CF\u72B6\u6001\uFF08hidden states\uFF09"),sr=a("\uFF0C\u4EA6\u79F0"),bt=i("em"),tr=a("\u7279\u5F81\uFF08features\uFF09"),lr=a("\u3002\u5BF9\u4E8E\u6BCF\u4E2A\u6A21\u578B\u8F93\u5165\uFF0C\u6211\u4EEC\u5C06\u68C0\u7D22\u4E00\u4E2A\u9AD8\u7EF4\u5411\u91CF\uFF0C\u8868\u793A"),ht=i("strong"),nr=a("Transformer\u6A21\u578B\u5BF9\u8BE5\u8F93\u5165\u7684\u4E0A\u4E0B\u6587\u7406\u89E3"),rr=a("\u3002"),bl=m(),ws=i("p"),ar=a("\u5982\u679C\u8FD9\u4E0D\u5408\u7406\uFF0C\u4E0D\u8981\u62C5\u5FC3\u3002\u6211\u4EEC\u4EE5\u540E\u518D\u89E3\u91CA\u3002"),hl=m(),fe=i("p"),or=a("\u867D\u7136\u8FD9\u4E9B\u9690\u85CF\u72B6\u6001\u672C\u8EAB\u53EF\u80FD\u5F88\u6709\u7528\uFF0C\u4F46\u5B83\u4EEC\u901A\u5E38\u662F\u6A21\u578B\u53E6\u4E00\u90E8\u5206\uFF08\u79F0\u4E3A"),$t=i("em"),pr=a("\u5934\u90E8(head)"),ir=a("\uFF09\u7684\u8F93\u5165\u3002 \u5728"),ys=i("a"),cr=a("Chapter 1"),fr=a("\u4E2D\uFF0C\u53EF\u4EE5\u4F7F\u7528\u76F8\u540C\u7684\u4F53\u7CFB\u7ED3\u6784\u6267\u884C\u4E0D\u540C\u7684\u4EFB\u52A1\uFF0C\u4F46\u8FD9\u4E9B\u4EFB\u52A1\u4E2D\u7684\u6BCF\u4E2A\u4EFB\u52A1\u90FD\u6709\u4E00\u4E2A\u4E0E\u4E4B\u5173\u8054\u7684\u4E0D\u540C\u5934\u3002"),$l=m(),Ue=i("h3"),ur=a("\u9AD8\u7EF4\u5411\u91CF\uFF1F"),jl=m(),gs=i("p"),mr=a("Transformers\u6A21\u5757\u7684\u77E2\u91CF\u8F93\u51FA\u901A\u5E38\u8F83\u5927\u3002\u5B83\u901A\u5E38\u6709\u4E09\u4E2A\u7EF4\u5EA6\uFF1A"),kl=m(),ue=i("ul"),Ts=i("li"),jt=i("strong"),_r=a("Batch size"),dr=a(": \u4E00\u6B21\u5904\u7406\u7684\u5E8F\u5217\u6570\uFF08\u5728\u6211\u4EEC\u7684\u793A\u4F8B\u4E2D\u4E3A2\uFF09\u3002"),br=m(),Cs=i("li"),kt=i("strong"),hr=a("Sequence length"),$r=a(": \u5E8F\u5217\u7684\u6570\u503C\u8868\u793A\u7684\u957F\u5EA6\uFF08\u5728\u6211\u4EEC\u7684\u793A\u4F8B\u4E2D\u4E3A16\uFF09\u3002"),jr=m(),Ps=i("li"),Et=i("strong"),kr=a("Hidden size"),Er=a(": \u6BCF\u4E2A\u6A21\u578B\u8F93\u5165\u7684\u5411\u91CF\u7EF4\u5EA6\u3002"),El=m(),Ms=i("p"),vr=a("\u7531\u4E8E\u6700\u540E\u4E00\u4E2A\u503C\uFF0C\u5B83\u88AB\u79F0\u4E3A\u201C\u9AD8\u7EF4\u201D\u3002\u9690\u85CF\u7684\u5927\u5C0F\u53EF\u80FD\u975E\u5E38\u5927\uFF08768\u901A\u5E38\u7528\u4E8E\u8F83\u5C0F\u7684\u578B\u53F7\uFF0C\u800C\u5728\u8F83\u5927\u7684\u578B\u53F7\u4E2D\uFF0C\u8FD9\u53EF\u80FD\u8FBE\u52303072\u6216\u66F4\u5927\uFF09\u3002"),vl=m(),Fs=i("p"),wr=a("\u5982\u679C\u6211\u4EEC\u5C06\u9884\u5904\u7406\u7684\u8F93\u5165\u8F93\u5165\u5230\u6A21\u578B\u4E2D\uFF0C\u6211\u4EEC\u53EF\u4EE5\u770B\u5230\u8FD9\u4E00\u70B9\uFF1A"),wl=m(),X.c(),As=m(),V=i("p"),yr=a("\u6CE8\u610F\u{1F917} Transformers\u6A21\u578B\u7684\u8F93\u51FA\u4E0E"),vt=i("code"),gr=a("namedtuple"),Tr=a("\u6216\u8BCD\u5178\u76F8\u4F3C\u3002\u60A8\u53EF\u4EE5\u901A\u8FC7\u5C5E\u6027\uFF08\u5C31\u50CF\u6211\u4EEC\u6240\u505A\u7684\u90A3\u6837\uFF09\u6216\u952E\uFF08"),wt=i("code"),Cr=a('\u8F93\u51FA["last_hidden_state"]'),Pr=a("\uFF09\u8BBF\u95EE\u5143\u7D20\uFF0C\u751A\u81F3\u53EF\u4EE5\u901A\u8FC7\u7D22\u5F15\u8BBF\u95EE\u5143\u7D20\uFF0C\u524D\u63D0\u662F\u60A8\u786E\u5207\u77E5\u9053\u8981\u67E5\u627E\u7684\u5185\u5BB9\u5728\u54EA\u91CC\uFF08"),yt=i("code"),Mr=a("outputs[0]"),Fr=a("\uFF09\u3002"),yl=m(),Qe=i("h3"),Ar=a("\u6A21\u578B\u5934\uFF1A\u6570\u5B57\u7684\u610F\u4E49"),gl=m(),xs=i("p"),xr=a("\u6A21\u578B\u5934\u5C06\u9690\u85CF\u72B6\u6001\u7684\u9AD8\u7EF4\u5411\u91CF\u4F5C\u4E3A\u8F93\u5165\uFF0C\u5E76\u5C06\u5176\u6295\u5F71\u5230\u4E0D\u540C\u7684\u7EF4\u5EA6\u3002\u5B83\u4EEC\u901A\u5E38\u7531\u4E00\u4E2A\u6216\u51E0\u4E2A\u7EBF\u6027\u5C42\u7EC4\u6210\uFF1A"),Tl=m(),$e=i("div"),Ye=i("img"),Ir=m(),Je=i("img"),Cl=m(),Is=i("p"),qr=a("Transformers\u6A21\u578B\u7684\u8F93\u51FA\u76F4\u63A5\u53D1\u9001\u5230\u6A21\u578B\u5934\u8FDB\u884C\u5904\u7406\u3002"),Pl=m(),qs=i("p"),Dr=a("\u5728\u6B64\u56FE\u4E2D\uFF0C\u6A21\u578B\u7531\u5176\u5D4C\u5165\u5C42\u548C\u540E\u7EED\u5C42\u8868\u793A\u3002\u5D4C\u5165\u5C42\u5C06\u6807\u8BB0\u5316\u8F93\u5165\u4E2D\u7684\u6BCF\u4E2A\u8F93\u5165ID\u8F6C\u6362\u4E3A\u8868\u793A\u5173\u8054\u6807\u8BB0(token)\u7684\u5411\u91CF\u3002\u540E\u7EED\u5C42\u4F7F\u7528\u6CE8\u610F\u673A\u5236\u64CD\u7EB5\u8FD9\u4E9B\u5411\u91CF\uFF0C\u4EE5\u751F\u6210\u53E5\u5B50\u7684\u6700\u7EC8\u8868\u793A\u3002"),Ml=m(),Ds=i("p"),Sr=a("\u{1F917} Transformers\u4E2D\u6709\u8BB8\u591A\u4E0D\u540C\u7684\u4F53\u7CFB\u7ED3\u6784\uFF0C\u6BCF\u79CD\u4F53\u7CFB\u7ED3\u6784\u90FD\u662F\u56F4\u7ED5\u5904\u7406\u7279\u5B9A\u4EFB\u52A1\u800C\u8BBE\u8BA1\u7684\u3002\u4EE5\u4E0B\u662F\u4E00\u4E2A\u975E\u8BE6\u5C3D\u7684\u5217\u8868\uFF1A"),Fl=m(),D=i("ul"),Ss=i("li"),gt=i("code"),Or=a("*Model"),Nr=a(" (retrieve the hidden states)"),Lr=m(),Tt=i("li"),Ct=i("code"),zr=a("*ForCausalLM"),Gr=m(),Pt=i("li"),Mt=i("code"),Hr=a("*ForMaskedLM"),Vr=m(),Ft=i("li"),At=i("code"),Br=a("*ForMultipleChoice"),Rr=m(),xt=i("li"),It=i("code"),Ur=a("*ForQuestionAnswering"),Qr=m(),qt=i("li"),Dt=i("code"),Yr=a("*ForSequenceClassification"),Jr=m(),St=i("li"),Ot=i("code"),Wr=a("*ForTokenClassification"),Xr=m(),Nt=i("li"),Kr=a("\u4EE5\u53CA\u5176\u4ED6 \u{1F917}"),Al=m(),Z.c(),Os=m(),Ns=i("p"),Zr=a("\u73B0\u5728\uFF0C\u5982\u679C\u6211\u4EEC\u89C2\u5BDF\u8F93\u5165\u7684\u5F62\u72B6\uFF0C\u7EF4\u5EA6\u5C06\u4F4E\u5F97\u591A\uFF1A\u6A21\u578B\u5934\u5C06\u6211\u4EEC\u4E4B\u524D\u770B\u5230\u7684\u9AD8\u7EF4\u5411\u91CF\u4F5C\u4E3A\u8F93\u5165\uFF0C\u5E76\u8F93\u51FA\u5305\u542B\u4E24\u4E2A\u503C\u7684\u5411\u91CF\uFF08\u6BCF\u4E2A\u6807\u7B7E\u4E00\u4E2A\uFF09\uFF1A"),xl=m(),g(We.$$.fragment),Il=m(),se.c(),Ls=m(),zs=i("p"),ea=a("\u56E0\u4E3A\u6211\u4EEC\u53EA\u6709\u4E24\u4E2A\u53E5\u5B50\u548C\u4E24\u4E2A\u6807\u7B7E\uFF0C\u6240\u4EE5\u6211\u4EEC\u4ECE\u6A21\u578B\u4E2D\u5F97\u5230\u7684\u7ED3\u679C\u662F2 x 2\u7684\u5F62\u72B6\u3002"),ql=m(),Xe=i("h2"),sa=a("\u5BF9\u8F93\u51FA\u8FDB\u884C\u540E\u5904\u7406"),Dl=m(),Gs=i("p"),ta=a("\u6211\u4EEC\u4ECE\u6A21\u578B\u4E2D\u5F97\u5230\u7684\u8F93\u51FA\u503C\u672C\u8EAB\u5E76\u4E0D\u4E00\u5B9A\u6709\u610F\u4E49\u3002\u6211\u4EEC\u6765\u770B\u770B,"),Sl=m(),g(Ke.$$.fragment),Ol=m(),le.c(),Hs=m(),L=i("p"),la=a("\u6211\u4EEC\u7684\u6A21\u578B\u9884\u6D4B\u7B2C\u4E00\u53E5\u4E3A"),Lt=i("code"),na=a("[-1.5607, 1.6123]"),ra=a("\uFF0C\u7B2C\u4E8C\u53E5\u4E3A"),zt=i("code"),aa=a("[ 4.1692, -3.3464]"),oa=a("\u3002\u8FD9\u4E9B\u4E0D\u662F\u6982\u7387\uFF0C\u800C\u662F"),Gt=i("em"),pa=a("logits"),ia=a("\uFF0C\u5373\u6A21\u578B\u6700\u540E\u4E00\u5C42\u8F93\u51FA\u7684\u539F\u59CB\u975E\u6807\u51C6\u5316\u5206\u6570\u3002\u8981\u8F6C\u6362\u4E3A\u6982\u7387\uFF0C\u5B83\u4EEC\u9700\u8981\u7ECF\u8FC7"),Ze=i("a"),ca=a("SoftMax"),fa=a("\u5C42\uFF08\u6240\u6709\u{1F917}Transformers\u6A21\u578B\u8F93\u51FAlogits\uFF0C\u56E0\u4E3A\u7528\u4E8E\u8BAD\u7EC3\u7684\u635F\u8017\u51FD\u6570\u901A\u5E38\u4F1A\u5C06\u6700\u540E\u7684\u6FC0\u6D3B\u51FD\u6570\uFF08\u5982SoftMax\uFF09\u4E0E\u5B9E\u9645\u635F\u8017\u51FD\u6570\uFF08\u5982\u4EA4\u53C9\u71B5\uFF09\u878D\u5408\uFF09\uFF1A"),Nl=m(),re.c(),Vs=m(),oe.c(),Bs=m(),me=i("p"),ua=a("\u73B0\u5728\u6211\u4EEC\u53EF\u4EE5\u770B\u5230\uFF0C\u6A21\u578B\u9884\u6D4B\u7B2C\u4E00\u53E5\u4E3A"),Ht=i("code"),ma=a("[0.0402, 0.9598]"),_a=a("\uFF0C\u7B2C\u4E8C\u53E5\u4E3A"),Vt=i("code"),da=a("[0.9995, 0.0005]"),ba=a("\u3002\u8FD9\u4E9B\u662F\u53EF\u8BC6\u522B\u7684\u6982\u7387\u5206\u6570\u3002"),Ll=m(),ye=i("p"),ha=a("\u4E3A\u4E86\u83B7\u5F97\u6BCF\u4E2A\u4F4D\u7F6E\u5BF9\u5E94\u7684\u6807\u7B7E\uFF0C\u6211\u4EEC\u53EF\u4EE5\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u7684"),Bt=i("code"),$a=a("id2label"),ja=a("\u5C5E\u6027\uFF08\u4E0B\u4E00\u8282\u5C06\u5BF9\u6B64\u8FDB\u884C\u8BE6\u7EC6\u4ECB\u7ECD\uFF09\uFF1A"),zl=m(),g(es.$$.fragment),Gl=m(),g(ss.$$.fragment),Hl=m(),Rs=i("p"),ka=a("\u73B0\u5728\u6211\u4EEC\u53EF\u4EE5\u5F97\u51FA\u7ED3\u8BBA\uFF0C\u8BE5\u6A21\u578B\u9884\u6D4B\u4E86\u4EE5\u4E0B\u51E0\u70B9\uFF1A"),Vl=m(),ge=i("ul"),Rt=i("li"),Ea=a("\u7B2C\u4E00\u53E5\uFF1A\u5426\u5B9A\uFF1A0.0402\uFF0C\u80AF\u5B9A\uFF1A0.9598"),va=m(),Ut=i("li"),wa=a("\u7B2C\u4E8C\u53E5\uFF1A\u5426\u5B9A\uFF1A0.9995\uFF0C\u80AF\u5B9A\uFF1A0.0005"),Bl=m(),Us=i("p"),ya=a("\u6211\u4EEC\u5DF2\u7ECF\u6210\u529F\u5730\u590D\u5236\u4E86\u7BA1\u9053\u7684\u4E09\u4E2A\u6B65\u9AA4\uFF1A\u4F7F\u7528\u6807\u8BB0\u5316\u5668\u8FDB\u884C\u9884\u5904\u7406\u3001\u901A\u8FC7\u6A21\u578B\u4F20\u9012\u8F93\u5165\u4EE5\u53CA\u540E\u5904\u7406\uFF01\u73B0\u5728\uFF0C\u8BA9\u6211\u4EEC\u82B1\u4E00\u4E9B\u65F6\u95F4\u6DF1\u5165\u4E86\u89E3\u8FD9\u4E9B\u6B65\u9AA4\u4E2D\u7684\u6BCF\u4E00\u6B65\u3002"),Rl=m(),g(Te.$$.fragment),this.h()},l(e){const r=vp('[data-svelte="svelte-1phssyn"]',document.head);l=c(r,"META",{name:!0,content:!0}),r.forEach(s),f=_(e),T(n.$$.fragment,e),d=_(e),b=c(e,"H1",{id:!0});var Qt=u(b);h=o(Qt,"\u7BA1\u9053\u7684\u5185\u90E8"),Qt.forEach(s),w=_(e),M.l(e),y=_(e),T(x.$$.fragment,e),$=_(e),q.l(e),S=_(e),je=c(e,"P",{});var Ce=u(je);Zl=o(Ce,"\u8BA9\u6211\u4EEC\u4ECE\u4E00\u4E2A\u5B8C\u6574\u7684\u793A\u4F8B\u5F00\u59CB\uFF0C\u770B\u770B\u5728"),ms=c(Ce,"A",{href:!0});var Yt=u(ms);en=o(Yt,"Chapter 1"),Yt.forEach(s),sn=o(Ce,"\u4E2D\u6267\u884C\u4EE5\u4E0B\u4EE3\u7801\u65F6\u5728\u5E55\u540E\u53D1\u751F\u4E86\u4EC0\u4E48"),Ce.forEach(s),Wt=_(e),T(Se.$$.fragment,e),Xt=_(e),_s=c(e,"P",{});var Qs=u(_s);tn=o(Qs,"\u83B7\u5F97:"),Qs.forEach(s),Kt=_(e),T(Oe.$$.fragment,e),Zt=_(e),ke=c(e,"P",{});var Pe=u(ke);ln=o(Pe,"\u6B63\u5982\u6211\u4EEC\u5728"),ds=c(Pe,"A",{href:!0});var Ys=u(ds);nn=o(Ys,"Chapter 1"),Ys.forEach(s),rn=o(Pe,"\u4E2D\u770B\u5230\u7684\uFF0C\u6B64\u7BA1\u9053\u5C06\u4E09\u4E2A\u6B65\u9AA4\u7EC4\u5408\u5728\u4E00\u8D77\uFF1A\u9884\u5904\u7406\u3001\u901A\u8FC7\u6A21\u578B\u4F20\u9012\u8F93\u5165\u548C\u540E\u5904\u7406\uFF1A"),Pe.forEach(s),el=_(e),he=c(e,"DIV",{class:!0});var Me=u(he);Ne=c(Me,"IMG",{class:!0,src:!0,alt:!0}),an=_(Me),Le=c(Me,"IMG",{class:!0,src:!0,alt:!0}),Me.forEach(s),sl=_(e),bs=c(e,"P",{});var Js=u(bs);on=o(Js,"\u8BA9\u6211\u4EEC\u5FEB\u901F\u6D4F\u89C8\u4E00\u4E0B\u8FD9\u4E9B\u5185\u5BB9\u3002"),Js.forEach(s),tl=_(e),ze=c(e,"H2",{id:!0});var Ws=u(ze);pn=o(Ws,"\u4F7F\u7528\u5206\u8BCD\u5668\u8FDB\u884C\u9884\u5904\u7406"),Ws.forEach(s),ll=_(e),Ee=c(e,"P",{});var Fe=u(Ee);cn=o(Fe,"\u4E0E\u5176\u4ED6\u795E\u7ECF\u7F51\u7EDC\u4E00\u6837\uFF0CTransformer\u6A21\u578B\u65E0\u6CD5\u76F4\u63A5\u5904\u7406\u539F\u59CB\u6587\u672C\uFF0C \u56E0\u6B64\u6211\u4EEC\u7BA1\u9053\u7684\u7B2C\u4E00\u6B65\u662F\u5C06\u6587\u672C\u8F93\u5165\u8F6C\u6362\u4E3A\u6A21\u578B\u80FD\u591F\u7406\u89E3\u7684\u6570\u5B57\u3002 \u4E3A\u6B64\uFF0C\u6211\u4EEC\u4F7F\u7528"),st=c(Fe,"EM",{});var Xs=u(st);fn=o(Xs,"tokenizer"),Xs.forEach(s),un=o(Fe,"(\u6807\u8BB0\u5668)\uFF0C\u8D1F\u8D23\uFF1A"),Fe.forEach(s),nl=_(e),ce=c(e,"UL",{});var _e=u(ce);Ge=c(_e,"LI",{});var Ae=u(Ge);mn=o(Ae,"\u5C06\u8F93\u5165\u62C6\u5206\u4E3A\u5355\u8BCD\u3001\u5B50\u5355\u8BCD\u6216\u7B26\u53F7\uFF08\u5982\u6807\u70B9\u7B26\u53F7\uFF09\uFF0C\u79F0\u4E3A\u6807\u8BB0("),tt=c(Ae,"EM",{});var Jt=u(tt);_n=o(Jt,"token"),Jt.forEach(s),dn=o(Ae,")"),Ae.forEach(s),bn=_(_e),lt=c(_e,"LI",{});var so=u(lt);hn=o(so,"\u5C06\u6BCF\u4E2A\u6807\u8BB0(token)\u6620\u5C04\u5230\u4E00\u4E2A\u6574\u6570"),so.forEach(s),$n=_(_e),nt=c(_e,"LI",{});var to=u(nt);jn=o(to,"\u6DFB\u52A0\u53EF\u80FD\u5BF9\u6A21\u578B\u6709\u7528\u7684\u5176\u4ED6\u8F93\u5165"),to.forEach(s),_e.forEach(s),rl=_(e),z=c(e,"P",{});var xe=u(z);kn=o(xe,"\u6240\u6709\u8FD9\u4E9B\u9884\u5904\u7406\u90FD\u9700\u8981\u4EE5\u4E0E\u6A21\u578B\u9884\u8BAD\u7EC3\u65F6\u5B8C\u5168\u76F8\u540C\u7684\u65B9\u5F0F\u5B8C\u6210\uFF0C\u56E0\u6B64\u6211\u4EEC\u9996\u5148\u9700\u8981\u4ECE"),He=c(xe,"A",{href:!0,rel:!0});var lo=u(He);En=o(lo,"Model Hub"),lo.forEach(s),vn=o(xe,"\u4E2D\u4E0B\u8F7D\u8FD9\u4E9B\u4FE1\u606F\u3002\u4E3A\u6B64\uFF0C\u6211\u4EEC\u4F7F\u7528"),rt=c(xe,"CODE",{});var no=u(rt);wn=o(no,"AutoTokenizer"),no.forEach(s),yn=o(xe,"\u7C7B\u53CA\u5176"),at=c(xe,"CODE",{});var ro=u(at);gn=o(ro,"from_pretrained()"),ro.forEach(s),Tn=o(xe,"\u65B9\u6CD5\u3002\u4F7F\u7528\u6211\u4EEC\u6A21\u578B\u7684\u68C0\u67E5\u70B9\u540D\u79F0\uFF0C\u5B83\u5C06\u81EA\u52A8\u83B7\u53D6\u4E0E\u6A21\u578B\u7684\u6807\u8BB0\u5668\u76F8\u5173\u8054\u7684\u6570\u636E\uFF0C\u5E76\u5BF9\u5176\u8FDB\u884C\u7F13\u5B58\uFF08\u56E0\u6B64\u53EA\u6709\u5728\u60A8\u7B2C\u4E00\u6B21\u8FD0\u884C\u4E0B\u9762\u7684\u4EE3\u7801\u65F6\u624D\u4F1A\u4E0B\u8F7D\uFF09\u3002"),xe.forEach(s),al=_(e),G=c(e,"P",{});var Ie=u(G);Cn=o(Ie,"\u56E0\u4E3A"),ot=c(Ie,"CODE",{});var ao=u(ot);Pn=o(ao,"sentiment-analysis"),ao.forEach(s),Mn=o(Ie,"\uFF08\u60C5\u7EEA\u5206\u6790\uFF09\u7BA1\u9053\u7684\u9ED8\u8BA4\u68C0\u67E5\u70B9\u662F"),pt=c(Ie,"CODE",{});var oo=u(pt);Fn=o(oo,"distilbert-base-uncased-finetuned-sst-2-english"),oo.forEach(s),An=o(Ie,"\uFF08\u4F60\u53EF\u4EE5\u770B\u5230\u5B83\u7684\u6A21\u578B\u5361"),Ve=c(Ie,"A",{href:!0,rel:!0});var po=u(Ve);xn=o(po,"here"),po.forEach(s),In=o(Ie,")\uFF0C\u6211\u4EEC\u8FD0\u884C\u4EE5\u4E0B\u7A0B\u5E8F\uFF1A"),Ie.forEach(s),ol=_(e),T(Be.$$.fragment,e),pl=_(e),hs=c(e,"P",{});var io=u(hs);qn=o(io,"\u4E00\u65E6\u6211\u4EEC\u6709\u4E86\u6807\u8BB0\u5668\uFF0C\u6211\u4EEC\u5C31\u53EF\u4EE5\u76F4\u63A5\u5C06\u6211\u4EEC\u7684\u53E5\u5B50\u4F20\u9012\u7ED9\u5B83\uFF0C\u7136\u540E\u6211\u4EEC\u5C31\u4F1A\u5F97\u5230\u4E00\u672C\u5B57\u5178\uFF0C\u5B83\u53EF\u4EE5\u63D0\u4F9B\u7ED9\u6211\u4EEC\u7684\u6A21\u578B\uFF01\u5269\u4E0B\u8981\u505A\u7684\u552F\u4E00\u4E00\u4EF6\u4E8B\u5C31\u662F\u5C06\u8F93\u5165ID\u5217\u8868\u8F6C\u6362\u4E3A\u5F20\u91CF\u3002"),io.forEach(s),il=_(e),ve=c(e,"P",{});var Ql=u(ve);Dn=o(Ql,"\u60A8\u53EF\u4EE5\u4F7F\u7528\u{1F917} Transformers\uFF0C\u800C\u4E0D\u5FC5\u62C5\u5FC3\u54EA\u4E2AML\u6846\u67B6\u88AB\u7528\u4F5C\u540E\u7AEF\uFF1B\u5B83\u53EF\u80FD\u662FPyTorch\u6216TensorFlow\uFF0C\u6216Flax\u3002\u4F46\u662F\uFF0CTransformers\u578B\u53F7\u53EA\u63A5\u53D7"),it=c(Ql,"EM",{});var co=u(it);Sn=o(co,"\u5F20\u91CF"),co.forEach(s),On=o(Ql,"\u4F5C\u4E3A\u8F93\u5165\u3002\u5982\u679C\u8FD9\u662F\u4F60\u7B2C\u4E00\u6B21\u542C\u8BF4\u5F20\u91CF\uFF0C\u4F60\u53EF\u4EE5\u628A\u5B83\u4EEC\u60F3\u8C61\u6210NumPy\u6570\u7EC4\u3002NumPy\u6570\u7EC4\u53EF\u4EE5\u662F\u6807\u91CF\uFF080D\uFF09\u3001\u5411\u91CF\uFF081D\uFF09\u3001\u77E9\u9635\uFF082D\uFF09\u6216\u5177\u6709\u66F4\u591A\u7EF4\u5EA6\u3002\u5B83\u5B9E\u9645\u4E0A\u662F\u5F20\u91CF\uFF1B\u5176\u4ED6ML\u6846\u67B6\u7684\u5F20\u91CF\u884C\u4E3A\u7C7B\u4F3C\uFF0C\u901A\u5E38\u4E0ENumPy\u6570\u7EC4\u4E00\u6837\u6613\u4E8E\u5B9E\u4F8B\u5316\u3002"),Ql.forEach(s),cl=_(e),we=c(e,"P",{});var Yl=u(we);Nn=o(Yl,"\u8981\u6307\u5B9A\u8981\u8FD4\u56DE\u7684\u5F20\u91CF\u7C7B\u578B\uFF08PyTorch\u3001TensorFlow\u6216plain NumPy\uFF09\uFF0C\u6211\u4EEC\u4F7F\u7528"),ct=c(Yl,"CODE",{});var fo=u(ct);Ln=o(fo,"return_tensors"),fo.forEach(s),zn=o(Yl,"\u53C2\u6570\uFF1A"),Yl.forEach(s),fl=_(e),R.l(e),$s=_(e),js=c(e,"P",{});var uo=u(js);Gn=o(uo,"\u73B0\u5728\u4E0D\u8981\u62C5\u5FC3\u586B\u5145\u548C\u622A\u65AD\uFF1B\u6211\u4EEC\u7A0D\u540E\u4F1A\u89E3\u91CA\u8FD9\u4E9B\u3002\u8FD9\u91CC\u8981\u8BB0\u4F4F\u7684\u4E3B\u8981\u4E8B\u60C5\u662F\uFF0C\u60A8\u53EF\u4EE5\u4F20\u9012\u4E00\u4E2A\u53E5\u5B50\u6216\u4E00\u7EC4\u53E5\u5B50\uFF0C\u8FD8\u53EF\u4EE5\u6307\u5B9A\u8981\u8FD4\u56DE\u7684\u5F20\u91CF\u7C7B\u578B\uFF08\u5982\u679C\u6CA1\u6709\u4F20\u9012\u7C7B\u578B\uFF0C\u60A8\u5C06\u5F97\u5230\u4E00\u7EC4\u5217\u8868\uFF09\u3002"),uo.forEach(s),ul=_(e),Q.l(e),ks=_(e),N=c(e,"P",{});var de=u(N);Hn=o(de,"\u8F93\u51FA\u672C\u8EAB\u662F\u4E00\u4E2A\u5305\u542B\u4E24\u4E2A\u952E\u7684\u5B57\u5178\uFF0C"),ft=c(de,"CODE",{});var mo=u(ft);Vn=o(mo,"input_ids"),mo.forEach(s),Bn=o(de,"\u548C"),ut=c(de,"CODE",{});var _o=u(ut);Rn=o(_o,"attention_mask"),_o.forEach(s),Un=o(de,"\u3002"),mt=c(de,"CODE",{});var bo=u(mt);Qn=o(bo,"input_ids"),bo.forEach(s),Yn=o(de,"\u5305\u542B\u4E24\u884C\u6574\u6570\uFF08\u6BCF\u4E2A\u53E5\u5B50\u4E00\u884C\uFF09\uFF0C\u5B83\u4EEC\u662F\u6BCF\u4E2A\u53E5\u5B50\u4E2D\u6807\u8BB0\u7684\u552F\u4E00\u6807\u8BB0\uFF08token\uFF09\u3002\u6211\u4EEC\u5C06\u5728\u672C\u7AE0\u540E\u9762\u89E3\u91CA\u4EC0\u4E48\u662F"),_t=c(de,"CODE",{});var ho=u(_t);Jn=o(ho,"attention_mask"),ho.forEach(s),Wn=o(de,"\u3002"),de.forEach(s),ml=_(e),Re=c(e,"H2",{id:!0});var $o=u(Re);Xn=o($o,"\u6D4F\u89C8\u6A21\u578B"),$o.forEach(s),_l=_(e),J.l(e),Es=_(e),vs=c(e,"P",{});var jo=u(vs);Kn=o(jo,"\u5728\u8FD9\u4E2A\u4EE3\u7801\u7247\u6BB5\u4E2D\uFF0C\u6211\u4EEC\u4E0B\u8F7D\u4E86\u4E4B\u524D\u5728\u7BA1\u9053\u4E2D\u4F7F\u7528\u7684\u76F8\u540C\u68C0\u67E5\u70B9\uFF08\u5B83\u5B9E\u9645\u4E0A\u5E94\u8BE5\u5DF2\u7ECF\u88AB\u7F13\u5B58\uFF09\uFF0C\u5E76\u7528\u5B83\u5B9E\u4F8B\u5316\u4E86\u4E00\u4E2A\u6A21\u578B\u3002"),jo.forEach(s),dl=_(e),H=c(e,"P",{});var qe=u(H);Zn=o(qe,"\u8FD9\u4E2A\u67B6\u6784\u53EA\u5305\u542B\u57FA\u672C\u8F6C\u6362\u5668\u6A21\u5757\uFF1A\u7ED9\u5B9A\u4E00\u4E9B\u8F93\u5165\uFF0C\u5B83\u8F93\u51FA\u6211\u4EEC\u5C06\u8C03\u7528\u7684\u5185\u5BB9"),dt=c(qe,"EM",{});var ko=u(dt);er=o(ko,"\u9690\u85CF\u72B6\u6001\uFF08hidden states\uFF09"),ko.forEach(s),sr=o(qe,"\uFF0C\u4EA6\u79F0"),bt=c(qe,"EM",{});var Eo=u(bt);tr=o(Eo,"\u7279\u5F81\uFF08features\uFF09"),Eo.forEach(s),lr=o(qe,"\u3002\u5BF9\u4E8E\u6BCF\u4E2A\u6A21\u578B\u8F93\u5165\uFF0C\u6211\u4EEC\u5C06\u68C0\u7D22\u4E00\u4E2A\u9AD8\u7EF4\u5411\u91CF\uFF0C\u8868\u793A"),ht=c(qe,"STRONG",{});var vo=u(ht);nr=o(vo,"Transformer\u6A21\u578B\u5BF9\u8BE5\u8F93\u5165\u7684\u4E0A\u4E0B\u6587\u7406\u89E3"),vo.forEach(s),rr=o(qe,"\u3002"),qe.forEach(s),bl=_(e),ws=c(e,"P",{});var wo=u(ws);ar=o(wo,"\u5982\u679C\u8FD9\u4E0D\u5408\u7406\uFF0C\u4E0D\u8981\u62C5\u5FC3\u3002\u6211\u4EEC\u4EE5\u540E\u518D\u89E3\u91CA\u3002"),wo.forEach(s),hl=_(e),fe=c(e,"P",{});var Ks=u(fe);or=o(Ks,"\u867D\u7136\u8FD9\u4E9B\u9690\u85CF\u72B6\u6001\u672C\u8EAB\u53EF\u80FD\u5F88\u6709\u7528\uFF0C\u4F46\u5B83\u4EEC\u901A\u5E38\u662F\u6A21\u578B\u53E6\u4E00\u90E8\u5206\uFF08\u79F0\u4E3A"),$t=c(Ks,"EM",{});var yo=u($t);pr=o(yo,"\u5934\u90E8(head)"),yo.forEach(s),ir=o(Ks,"\uFF09\u7684\u8F93\u5165\u3002 \u5728"),ys=c(Ks,"A",{href:!0});var go=u(ys);cr=o(go,"Chapter 1"),go.forEach(s),fr=o(Ks,"\u4E2D\uFF0C\u53EF\u4EE5\u4F7F\u7528\u76F8\u540C\u7684\u4F53\u7CFB\u7ED3\u6784\u6267\u884C\u4E0D\u540C\u7684\u4EFB\u52A1\uFF0C\u4F46\u8FD9\u4E9B\u4EFB\u52A1\u4E2D\u7684\u6BCF\u4E2A\u4EFB\u52A1\u90FD\u6709\u4E00\u4E2A\u4E0E\u4E4B\u5173\u8054\u7684\u4E0D\u540C\u5934\u3002"),Ks.forEach(s),$l=_(e),Ue=c(e,"H3",{id:!0});var To=u(Ue);ur=o(To,"\u9AD8\u7EF4\u5411\u91CF\uFF1F"),To.forEach(s),jl=_(e),gs=c(e,"P",{});var Co=u(gs);mr=o(Co,"Transformers\u6A21\u5757\u7684\u77E2\u91CF\u8F93\u51FA\u901A\u5E38\u8F83\u5927\u3002\u5B83\u901A\u5E38\u6709\u4E09\u4E2A\u7EF4\u5EA6\uFF1A"),Co.forEach(s),kl=_(e),ue=c(e,"UL",{});var Zs=u(ue);Ts=c(Zs,"LI",{});var ga=u(Ts);jt=c(ga,"STRONG",{});var Po=u(jt);_r=o(Po,"Batch size"),Po.forEach(s),dr=o(ga,": \u4E00\u6B21\u5904\u7406\u7684\u5E8F\u5217\u6570\uFF08\u5728\u6211\u4EEC\u7684\u793A\u4F8B\u4E2D\u4E3A2\uFF09\u3002"),ga.forEach(s),br=_(Zs),Cs=c(Zs,"LI",{});var Ta=u(Cs);kt=c(Ta,"STRONG",{});var Mo=u(kt);hr=o(Mo,"Sequence length"),Mo.forEach(s),$r=o(Ta,": \u5E8F\u5217\u7684\u6570\u503C\u8868\u793A\u7684\u957F\u5EA6\uFF08\u5728\u6211\u4EEC\u7684\u793A\u4F8B\u4E2D\u4E3A16\uFF09\u3002"),Ta.forEach(s),jr=_(Zs),Ps=c(Zs,"LI",{});var Ca=u(Ps);Et=c(Ca,"STRONG",{});var Fo=u(Et);kr=o(Fo,"Hidden size"),Fo.forEach(s),Er=o(Ca,": \u6BCF\u4E2A\u6A21\u578B\u8F93\u5165\u7684\u5411\u91CF\u7EF4\u5EA6\u3002"),Ca.forEach(s),Zs.forEach(s),El=_(e),Ms=c(e,"P",{});var Ao=u(Ms);vr=o(Ao,"\u7531\u4E8E\u6700\u540E\u4E00\u4E2A\u503C\uFF0C\u5B83\u88AB\u79F0\u4E3A\u201C\u9AD8\u7EF4\u201D\u3002\u9690\u85CF\u7684\u5927\u5C0F\u53EF\u80FD\u975E\u5E38\u5927\uFF08768\u901A\u5E38\u7528\u4E8E\u8F83\u5C0F\u7684\u578B\u53F7\uFF0C\u800C\u5728\u8F83\u5927\u7684\u578B\u53F7\u4E2D\uFF0C\u8FD9\u53EF\u80FD\u8FBE\u52303072\u6216\u66F4\u5927\uFF09\u3002"),Ao.forEach(s),vl=_(e),Fs=c(e,"P",{});var xo=u(Fs);wr=o(xo,"\u5982\u679C\u6211\u4EEC\u5C06\u9884\u5904\u7406\u7684\u8F93\u5165\u8F93\u5165\u5230\u6A21\u578B\u4E2D\uFF0C\u6211\u4EEC\u53EF\u4EE5\u770B\u5230\u8FD9\u4E00\u70B9\uFF1A"),xo.forEach(s),wl=_(e),X.l(e),As=_(e),V=c(e,"P",{});var De=u(V);yr=o(De,"\u6CE8\u610F\u{1F917} Transformers\u6A21\u578B\u7684\u8F93\u51FA\u4E0E"),vt=c(De,"CODE",{});var Io=u(vt);gr=o(Io,"namedtuple"),Io.forEach(s),Tr=o(De,"\u6216\u8BCD\u5178\u76F8\u4F3C\u3002\u60A8\u53EF\u4EE5\u901A\u8FC7\u5C5E\u6027\uFF08\u5C31\u50CF\u6211\u4EEC\u6240\u505A\u7684\u90A3\u6837\uFF09\u6216\u952E\uFF08"),wt=c(De,"CODE",{});var qo=u(wt);Cr=o(qo,'\u8F93\u51FA["last_hidden_state"]'),qo.forEach(s),Pr=o(De,"\uFF09\u8BBF\u95EE\u5143\u7D20\uFF0C\u751A\u81F3\u53EF\u4EE5\u901A\u8FC7\u7D22\u5F15\u8BBF\u95EE\u5143\u7D20\uFF0C\u524D\u63D0\u662F\u60A8\u786E\u5207\u77E5\u9053\u8981\u67E5\u627E\u7684\u5185\u5BB9\u5728\u54EA\u91CC\uFF08"),yt=c(De,"CODE",{});var Do=u(yt);Mr=o(Do,"outputs[0]"),Do.forEach(s),Fr=o(De,"\uFF09\u3002"),De.forEach(s),yl=_(e),Qe=c(e,"H3",{id:!0});var So=u(Qe);Ar=o(So,"\u6A21\u578B\u5934\uFF1A\u6570\u5B57\u7684\u610F\u4E49"),So.forEach(s),gl=_(e),xs=c(e,"P",{});var Oo=u(xs);xr=o(Oo,"\u6A21\u578B\u5934\u5C06\u9690\u85CF\u72B6\u6001\u7684\u9AD8\u7EF4\u5411\u91CF\u4F5C\u4E3A\u8F93\u5165\uFF0C\u5E76\u5C06\u5176\u6295\u5F71\u5230\u4E0D\u540C\u7684\u7EF4\u5EA6\u3002\u5B83\u4EEC\u901A\u5E38\u7531\u4E00\u4E2A\u6216\u51E0\u4E2A\u7EBF\u6027\u5C42\u7EC4\u6210\uFF1A"),Oo.forEach(s),Tl=_(e),$e=c(e,"DIV",{class:!0});var Jl=u($e);Ye=c(Jl,"IMG",{class:!0,src:!0,alt:!0}),Ir=_(Jl),Je=c(Jl,"IMG",{class:!0,src:!0,alt:!0}),Jl.forEach(s),Cl=_(e),Is=c(e,"P",{});var No=u(Is);qr=o(No,"Transformers\u6A21\u578B\u7684\u8F93\u51FA\u76F4\u63A5\u53D1\u9001\u5230\u6A21\u578B\u5934\u8FDB\u884C\u5904\u7406\u3002"),No.forEach(s),Pl=_(e),qs=c(e,"P",{});var Lo=u(qs);Dr=o(Lo,"\u5728\u6B64\u56FE\u4E2D\uFF0C\u6A21\u578B\u7531\u5176\u5D4C\u5165\u5C42\u548C\u540E\u7EED\u5C42\u8868\u793A\u3002\u5D4C\u5165\u5C42\u5C06\u6807\u8BB0\u5316\u8F93\u5165\u4E2D\u7684\u6BCF\u4E2A\u8F93\u5165ID\u8F6C\u6362\u4E3A\u8868\u793A\u5173\u8054\u6807\u8BB0(token)\u7684\u5411\u91CF\u3002\u540E\u7EED\u5C42\u4F7F\u7528\u6CE8\u610F\u673A\u5236\u64CD\u7EB5\u8FD9\u4E9B\u5411\u91CF\uFF0C\u4EE5\u751F\u6210\u53E5\u5B50\u7684\u6700\u7EC8\u8868\u793A\u3002"),Lo.forEach(s),Ml=_(e),Ds=c(e,"P",{});var zo=u(Ds);Sr=o(zo,"\u{1F917} Transformers\u4E2D\u6709\u8BB8\u591A\u4E0D\u540C\u7684\u4F53\u7CFB\u7ED3\u6784\uFF0C\u6BCF\u79CD\u4F53\u7CFB\u7ED3\u6784\u90FD\u662F\u56F4\u7ED5\u5904\u7406\u7279\u5B9A\u4EFB\u52A1\u800C\u8BBE\u8BA1\u7684\u3002\u4EE5\u4E0B\u662F\u4E00\u4E2A\u975E\u8BE6\u5C3D\u7684\u5217\u8868\uFF1A"),zo.forEach(s),Fl=_(e),D=c(e,"UL",{});var O=u(D);Ss=c(O,"LI",{});var Pa=u(Ss);gt=c(Pa,"CODE",{});var Go=u(gt);Or=o(Go,"*Model"),Go.forEach(s),Nr=o(Pa," (retrieve the hidden states)"),Pa.forEach(s),Lr=_(O),Tt=c(O,"LI",{});var Ho=u(Tt);Ct=c(Ho,"CODE",{});var Vo=u(Ct);zr=o(Vo,"*ForCausalLM"),Vo.forEach(s),Ho.forEach(s),Gr=_(O),Pt=c(O,"LI",{});var Bo=u(Pt);Mt=c(Bo,"CODE",{});var Ro=u(Mt);Hr=o(Ro,"*ForMaskedLM"),Ro.forEach(s),Bo.forEach(s),Vr=_(O),Ft=c(O,"LI",{});var Uo=u(Ft);At=c(Uo,"CODE",{});var Qo=u(At);Br=o(Qo,"*ForMultipleChoice"),Qo.forEach(s),Uo.forEach(s),Rr=_(O),xt=c(O,"LI",{});var Yo=u(xt);It=c(Yo,"CODE",{});var Jo=u(It);Ur=o(Jo,"*ForQuestionAnswering"),Jo.forEach(s),Yo.forEach(s),Qr=_(O),qt=c(O,"LI",{});var Wo=u(qt);Dt=c(Wo,"CODE",{});var Xo=u(Dt);Yr=o(Xo,"*ForSequenceClassification"),Xo.forEach(s),Wo.forEach(s),Jr=_(O),St=c(O,"LI",{});var Ko=u(St);Ot=c(Ko,"CODE",{});var Zo=u(Ot);Wr=o(Zo,"*ForTokenClassification"),Zo.forEach(s),Ko.forEach(s),Xr=_(O),Nt=c(O,"LI",{});var ep=u(Nt);Kr=o(ep,"\u4EE5\u53CA\u5176\u4ED6 \u{1F917}"),ep.forEach(s),O.forEach(s),Al=_(e),Z.l(e),Os=_(e),Ns=c(e,"P",{});var sp=u(Ns);Zr=o(sp,"\u73B0\u5728\uFF0C\u5982\u679C\u6211\u4EEC\u89C2\u5BDF\u8F93\u5165\u7684\u5F62\u72B6\uFF0C\u7EF4\u5EA6\u5C06\u4F4E\u5F97\u591A\uFF1A\u6A21\u578B\u5934\u5C06\u6211\u4EEC\u4E4B\u524D\u770B\u5230\u7684\u9AD8\u7EF4\u5411\u91CF\u4F5C\u4E3A\u8F93\u5165\uFF0C\u5E76\u8F93\u51FA\u5305\u542B\u4E24\u4E2A\u503C\u7684\u5411\u91CF\uFF08\u6BCF\u4E2A\u6807\u7B7E\u4E00\u4E2A\uFF09\uFF1A"),sp.forEach(s),xl=_(e),T(We.$$.fragment,e),Il=_(e),se.l(e),Ls=_(e),zs=c(e,"P",{});var tp=u(zs);ea=o(tp,"\u56E0\u4E3A\u6211\u4EEC\u53EA\u6709\u4E24\u4E2A\u53E5\u5B50\u548C\u4E24\u4E2A\u6807\u7B7E\uFF0C\u6240\u4EE5\u6211\u4EEC\u4ECE\u6A21\u578B\u4E2D\u5F97\u5230\u7684\u7ED3\u679C\u662F2 x 2\u7684\u5F62\u72B6\u3002"),tp.forEach(s),ql=_(e),Xe=c(e,"H2",{id:!0});var lp=u(Xe);sa=o(lp,"\u5BF9\u8F93\u51FA\u8FDB\u884C\u540E\u5904\u7406"),lp.forEach(s),Dl=_(e),Gs=c(e,"P",{});var np=u(Gs);ta=o(np,"\u6211\u4EEC\u4ECE\u6A21\u578B\u4E2D\u5F97\u5230\u7684\u8F93\u51FA\u503C\u672C\u8EAB\u5E76\u4E0D\u4E00\u5B9A\u6709\u610F\u4E49\u3002\u6211\u4EEC\u6765\u770B\u770B,"),np.forEach(s),Sl=_(e),T(Ke.$$.fragment,e),Ol=_(e),le.l(e),Hs=_(e),L=c(e,"P",{});var be=u(L);la=o(be,"\u6211\u4EEC\u7684\u6A21\u578B\u9884\u6D4B\u7B2C\u4E00\u53E5\u4E3A"),Lt=c(be,"CODE",{});var rp=u(Lt);na=o(rp,"[-1.5607, 1.6123]"),rp.forEach(s),ra=o(be,"\uFF0C\u7B2C\u4E8C\u53E5\u4E3A"),zt=c(be,"CODE",{});var ap=u(zt);aa=o(ap,"[ 4.1692, -3.3464]"),ap.forEach(s),oa=o(be,"\u3002\u8FD9\u4E9B\u4E0D\u662F\u6982\u7387\uFF0C\u800C\u662F"),Gt=c(be,"EM",{});var op=u(Gt);pa=o(op,"logits"),op.forEach(s),ia=o(be,"\uFF0C\u5373\u6A21\u578B\u6700\u540E\u4E00\u5C42\u8F93\u51FA\u7684\u539F\u59CB\u975E\u6807\u51C6\u5316\u5206\u6570\u3002\u8981\u8F6C\u6362\u4E3A\u6982\u7387\uFF0C\u5B83\u4EEC\u9700\u8981\u7ECF\u8FC7"),Ze=c(be,"A",{href:!0,rel:!0});var pp=u(Ze);ca=o(pp,"SoftMax"),pp.forEach(s),fa=o(be,"\u5C42\uFF08\u6240\u6709\u{1F917}Transformers\u6A21\u578B\u8F93\u51FAlogits\uFF0C\u56E0\u4E3A\u7528\u4E8E\u8BAD\u7EC3\u7684\u635F\u8017\u51FD\u6570\u901A\u5E38\u4F1A\u5C06\u6700\u540E\u7684\u6FC0\u6D3B\u51FD\u6570\uFF08\u5982SoftMax\uFF09\u4E0E\u5B9E\u9645\u635F\u8017\u51FD\u6570\uFF08\u5982\u4EA4\u53C9\u71B5\uFF09\u878D\u5408\uFF09\uFF1A"),be.forEach(s),Nl=_(e),re.l(e),Vs=_(e),oe.l(e),Bs=_(e),me=c(e,"P",{});var et=u(me);ua=o(et,"\u73B0\u5728\u6211\u4EEC\u53EF\u4EE5\u770B\u5230\uFF0C\u6A21\u578B\u9884\u6D4B\u7B2C\u4E00\u53E5\u4E3A"),Ht=c(et,"CODE",{});var ip=u(Ht);ma=o(ip,"[0.0402, 0.9598]"),ip.forEach(s),_a=o(et,"\uFF0C\u7B2C\u4E8C\u53E5\u4E3A"),Vt=c(et,"CODE",{});var cp=u(Vt);da=o(cp,"[0.9995, 0.0005]"),cp.forEach(s),ba=o(et,"\u3002\u8FD9\u4E9B\u662F\u53EF\u8BC6\u522B\u7684\u6982\u7387\u5206\u6570\u3002"),et.forEach(s),Ll=_(e),ye=c(e,"P",{});var Wl=u(ye);ha=o(Wl,"\u4E3A\u4E86\u83B7\u5F97\u6BCF\u4E2A\u4F4D\u7F6E\u5BF9\u5E94\u7684\u6807\u7B7E\uFF0C\u6211\u4EEC\u53EF\u4EE5\u68C0\u67E5\u6A21\u578B\u914D\u7F6E\u7684"),Bt=c(Wl,"CODE",{});var fp=u(Bt);$a=o(fp,"id2label"),fp.forEach(s),ja=o(Wl,"\u5C5E\u6027\uFF08\u4E0B\u4E00\u8282\u5C06\u5BF9\u6B64\u8FDB\u884C\u8BE6\u7EC6\u4ECB\u7ECD\uFF09\uFF1A"),Wl.forEach(s),zl=_(e),T(es.$$.fragment,e),Gl=_(e),T(ss.$$.fragment,e),Hl=_(e),Rs=c(e,"P",{});var up=u(Rs);ka=o(up,"\u73B0\u5728\u6211\u4EEC\u53EF\u4EE5\u5F97\u51FA\u7ED3\u8BBA\uFF0C\u8BE5\u6A21\u578B\u9884\u6D4B\u4E86\u4EE5\u4E0B\u51E0\u70B9\uFF1A"),up.forEach(s),Vl=_(e),ge=c(e,"UL",{});var Xl=u(ge);Rt=c(Xl,"LI",{});var mp=u(Rt);Ea=o(mp,"\u7B2C\u4E00\u53E5\uFF1A\u5426\u5B9A\uFF1A0.0402\uFF0C\u80AF\u5B9A\uFF1A0.9598"),mp.forEach(s),va=_(Xl),Ut=c(Xl,"LI",{});var _p=u(Ut);wa=o(_p,"\u7B2C\u4E8C\u53E5\uFF1A\u5426\u5B9A\uFF1A0.9995\uFF0C\u80AF\u5B9A\uFF1A0.0005"),_p.forEach(s),Xl.forEach(s),Bl=_(e),Us=c(e,"P",{});var dp=u(Us);ya=o(dp,"\u6211\u4EEC\u5DF2\u7ECF\u6210\u529F\u5730\u590D\u5236\u4E86\u7BA1\u9053\u7684\u4E09\u4E2A\u6B65\u9AA4\uFF1A\u4F7F\u7528\u6807\u8BB0\u5316\u5668\u8FDB\u884C\u9884\u5904\u7406\u3001\u901A\u8FC7\u6A21\u578B\u4F20\u9012\u8F93\u5165\u4EE5\u53CA\u540E\u5904\u7406\uFF01\u73B0\u5728\uFF0C\u8BA9\u6211\u4EEC\u82B1\u4E00\u4E9B\u65F6\u95F4\u6DF1\u5165\u4E86\u89E3\u8FD9\u4E9B\u6B65\u9AA4\u4E2D\u7684\u6BCF\u4E00\u6B65\u3002"),dp.forEach(s),Rl=_(e),T(Te.$$.fragment,e),this.h()},h(){F(l,"name","hf:doc:metadata"),F(l,"content",JSON.stringify(Wp)),F(b,"id",""),F(ms,"href","/course/chapter1"),F(ds,"href","/course/chapter1"),F(Ne,"class","block dark:hidden"),Kl(Ne.src,Ma="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter2/full_nlp_pipeline.svg")||F(Ne,"src",Ma),F(Ne,"alt","The full NLP pipeline: tokenization of text, conversion to IDs, and inference through the Transformer model and the model head."),F(Le,"class","hidden dark:block"),Kl(Le.src,Fa="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter2/full_nlp_pipeline-dark.svg")||F(Le,"src",Fa),F(Le,"alt","The full NLP pipeline: tokenization of text, conversion to IDs, and inference through the Transformer model and the model head."),F(he,"class","flex justify-center"),F(ze,"id",""),F(He,"href","https://huggingface.co/models"),F(He,"rel","nofollow"),F(Ve,"href","https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english"),F(Ve,"rel","nofollow"),F(Re,"id",""),F(ys,"href","/course/chapter1"),F(Ue,"id",""),F(Qe,"id",""),F(Ye,"class","block dark:hidden"),Kl(Ye.src,Aa="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter2/transformer_and_head.svg")||F(Ye,"src",Aa),F(Ye,"alt","A Transformer network alongside its head."),F(Je,"class","hidden dark:block"),Kl(Je.src,xa="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter2/transformer_and_head-dark.svg")||F(Je,"src",xa),F(Je,"alt","A Transformer network alongside its head."),F($e,"class","flex justify-center"),F(Xe,"id",""),F(Ze,"href","https://en.wikipedia.org/wiki/Softmax_function"),F(Ze,"rel","nofollow")},m(e,r){t(document.head,l),p(e,f,r),C(n,e,r),p(e,d,r),p(e,b,r),t(b,h),p(e,w,r),ts[A].m(e,r),p(e,y,r),C(x,e,r),p(e,$,r),ls[E].m(e,r),p(e,S,r),p(e,je,r),t(je,Zl),t(je,ms),t(ms,en),t(je,sn),p(e,Wt,r),C(Se,e,r),p(e,Xt,r),p(e,_s,r),t(_s,tn),p(e,Kt,r),C(Oe,e,r),p(e,Zt,r),p(e,ke,r),t(ke,ln),t(ke,ds),t(ds,nn),t(ke,rn),p(e,el,r),p(e,he,r),t(he,Ne),t(he,an),t(he,Le),p(e,sl,r),p(e,bs,r),t(bs,on),p(e,tl,r),p(e,ze,r),t(ze,pn),p(e,ll,r),p(e,Ee,r),t(Ee,cn),t(Ee,st),t(st,fn),t(Ee,un),p(e,nl,r),p(e,ce,r),t(ce,Ge),t(Ge,mn),t(Ge,tt),t(tt,_n),t(Ge,dn),t(ce,bn),t(ce,lt),t(lt,hn),t(ce,$n),t(ce,nt),t(nt,jn),p(e,rl,r),p(e,z,r),t(z,kn),t(z,He),t(He,En),t(z,vn),t(z,rt),t(rt,wn),t(z,yn),t(z,at),t(at,gn),t(z,Tn),p(e,al,r),p(e,G,r),t(G,Cn),t(G,ot),t(ot,Pn),t(G,Mn),t(G,pt),t(pt,Fn),t(G,An),t(G,Ve),t(Ve,xn),t(G,In),p(e,ol,r),C(Be,e,r),p(e,pl,r),p(e,hs,r),t(hs,qn),p(e,il,r),p(e,ve,r),t(ve,Dn),t(ve,it),t(it,Sn),t(ve,On),p(e,cl,r),p(e,we,r),t(we,Nn),t(we,ct),t(ct,Ln),t(we,zn),p(e,fl,r),ns[B].m(e,r),p(e,$s,r),p(e,js,r),t(js,Gn),p(e,ul,r),rs[U].m(e,r),p(e,ks,r),p(e,N,r),t(N,Hn),t(N,ft),t(ft,Vn),t(N,Bn),t(N,ut),t(ut,Rn),t(N,Un),t(N,mt),t(mt,Qn),t(N,Yn),t(N,_t),t(_t,Jn),t(N,Wn),p(e,ml,r),p(e,Re,r),t(Re,Xn),p(e,_l,r),as[Y].m(e,r),p(e,Es,r),p(e,vs,r),t(vs,Kn),p(e,dl,r),p(e,H,r),t(H,Zn),t(H,dt),t(dt,er),t(H,sr),t(H,bt),t(bt,tr),t(H,lr),t(H,ht),t(ht,nr),t(H,rr),p(e,bl,r),p(e,ws,r),t(ws,ar),p(e,hl,r),p(e,fe,r),t(fe,or),t(fe,$t),t($t,pr),t(fe,ir),t(fe,ys),t(ys,cr),t(fe,fr),p(e,$l,r),p(e,Ue,r),t(Ue,ur),p(e,jl,r),p(e,gs,r),t(gs,mr),p(e,kl,r),p(e,ue,r),t(ue,Ts),t(Ts,jt),t(jt,_r),t(Ts,dr),t(ue,br),t(ue,Cs),t(Cs,kt),t(kt,hr),t(Cs,$r),t(ue,jr),t(ue,Ps),t(Ps,Et),t(Et,kr),t(Ps,Er),p(e,El,r),p(e,Ms,r),t(Ms,vr),p(e,vl,r),p(e,Fs,r),t(Fs,wr),p(e,wl,r),os[W].m(e,r),p(e,As,r),p(e,V,r),t(V,yr),t(V,vt),t(vt,gr),t(V,Tr),t(V,wt),t(wt,Cr),t(V,Pr),t(V,yt),t(yt,Mr),t(V,Fr),p(e,yl,r),p(e,Qe,r),t(Qe,Ar),p(e,gl,r),p(e,xs,r),t(xs,xr),p(e,Tl,r),p(e,$e,r),t($e,Ye),t($e,Ir),t($e,Je),p(e,Cl,r),p(e,Is,r),t(Is,qr),p(e,Pl,r),p(e,qs,r),t(qs,Dr),p(e,Ml,r),p(e,Ds,r),t(Ds,Sr),p(e,Fl,r),p(e,D,r),t(D,Ss),t(Ss,gt),t(gt,Or),t(Ss,Nr),t(D,Lr),t(D,Tt),t(Tt,Ct),t(Ct,zr),t(D,Gr),t(D,Pt),t(Pt,Mt),t(Mt,Hr),t(D,Vr),t(D,Ft),t(Ft,At),t(At,Br),t(D,Rr),t(D,xt),t(xt,It),t(It,Ur),t(D,Qr),t(D,qt),t(qt,Dt),t(Dt,Yr),t(D,Jr),t(D,St),t(St,Ot),t(Ot,Wr),t(D,Xr),t(D,Nt),t(Nt,Kr),p(e,Al,r),ps[K].m(e,r),p(e,Os,r),p(e,Ns,r),t(Ns,Zr),p(e,xl,r),C(We,e,r),p(e,Il,r),is[ee].m(e,r),p(e,Ls,r),p(e,zs,r),t(zs,ea),p(e,ql,r),p(e,Xe,r),t(Xe,sa),p(e,Dl,r),p(e,Gs,r),t(Gs,ta),p(e,Sl,r),C(Ke,e,r),p(e,Ol,r),cs[te].m(e,r),p(e,Hs,r),p(e,L,r),t(L,la),t(L,Lt),t(Lt,na),t(L,ra),t(L,zt),t(zt,aa),t(L,oa),t(L,Gt),t(Gt,pa),t(L,ia),t(L,Ze),t(Ze,ca),t(L,fa),p(e,Nl,r),fs[ne].m(e,r),p(e,Vs,r),us[ae].m(e,r),p(e,Bs,r),p(e,me,r),t(me,ua),t(me,Ht),t(Ht,ma),t(me,_a),t(me,Vt),t(Vt,da),t(me,ba),p(e,Ll,r),p(e,ye,r),t(ye,ha),t(ye,Bt),t(Bt,$a),t(ye,ja),p(e,zl,r),C(es,e,r),p(e,Gl,r),C(ss,e,r),p(e,Hl,r),p(e,Rs,r),t(Rs,ka),p(e,Vl,r),p(e,ge,r),t(ge,Rt),t(Rt,Ea),t(ge,va),t(ge,Ut),t(Ut,wa),p(e,Bl,r),p(e,Us,r),t(Us,ya),p(e,Rl,r),C(Te,e,r),Ul=!0},p(e,[r]){const Qt={};r&1&&(Qt.fw=e[0]),n.$set(Qt);let Ce=A;A=qa(e),A!==Ce&&(ie(),j(ts[Ce],1,1,()=>{ts[Ce]=null}),pe(),M=ts[A],M||(M=ts[A]=Ia[A](e),M.c()),k(M,1),M.m(y.parentNode,y));const Yt={};r&2&&(Yt.$$scope={dirty:r,ctx:e}),x.$set(Yt);let Qs=E;E=Sa(e),E!==Qs&&(ie(),j(ls[Qs],1,1,()=>{ls[Qs]=null}),pe(),q=ls[E],q||(q=ls[E]=Da[E](e),q.c()),k(q,1),q.m(S.parentNode,S));let Pe=B;B=Na(e),B!==Pe&&(ie(),j(ns[Pe],1,1,()=>{ns[Pe]=null}),pe(),R=ns[B],R||(R=ns[B]=Oa[B](e),R.c()),k(R,1),R.m($s.parentNode,$s));let Ys=U;U=za(e),U!==Ys&&(ie(),j(rs[Ys],1,1,()=>{rs[Ys]=null}),pe(),Q=rs[U],Q||(Q=rs[U]=La[U](e),Q.c()),k(Q,1),Q.m(ks.parentNode,ks));let Me=Y;Y=Ha(e),Y!==Me&&(ie(),j(as[Me],1,1,()=>{as[Me]=null}),pe(),J=as[Y],J||(J=as[Y]=Ga[Y](e),J.c()),k(J,1),J.m(Es.parentNode,Es));let Js=W;W=Ba(e),W!==Js&&(ie(),j(os[Js],1,1,()=>{os[Js]=null}),pe(),X=os[W],X||(X=os[W]=Va[W](e),X.c()),k(X,1),X.m(As.parentNode,As));let Ws=K;K=Ua(e),K!==Ws&&(ie(),j(ps[Ws],1,1,()=>{ps[Ws]=null}),pe(),Z=ps[K],Z||(Z=ps[K]=Ra[K](e),Z.c()),k(Z,1),Z.m(Os.parentNode,Os));let Fe=ee;ee=Ya(e),ee!==Fe&&(ie(),j(is[Fe],1,1,()=>{is[Fe]=null}),pe(),se=is[ee],se||(se=is[ee]=Qa[ee](e),se.c()),k(se,1),se.m(Ls.parentNode,Ls));let Xs=te;te=Wa(e),te!==Xs&&(ie(),j(cs[Xs],1,1,()=>{cs[Xs]=null}),pe(),le=cs[te],le||(le=cs[te]=Ja[te](e),le.c()),k(le,1),le.m(Hs.parentNode,Hs));let _e=ne;ne=Ka(e),ne!==_e&&(ie(),j(fs[_e],1,1,()=>{fs[_e]=null}),pe(),re=fs[ne],re||(re=fs[ne]=Xa[ne](e),re.c()),k(re,1),re.m(Vs.parentNode,Vs));let Ae=ae;ae=eo(e),ae!==Ae&&(ie(),j(us[Ae],1,1,()=>{us[Ae]=null}),pe(),oe=us[ae],oe||(oe=us[ae]=Za[ae](e),oe.c()),k(oe,1),oe.m(Bs.parentNode,Bs));const Jt={};r&2&&(Jt.$$scope={dirty:r,ctx:e}),Te.$set(Jt)},i(e){Ul||(k(n.$$.fragment,e),k(M),k(x.$$.fragment,e),k(q),k(Se.$$.fragment,e),k(Oe.$$.fragment,e),k(Be.$$.fragment,e),k(R),k(Q),k(J),k(X),k(Z),k(We.$$.fragment,e),k(se),k(Ke.$$.fragment,e),k(le),k(re),k(oe),k(es.$$.fragment,e),k(ss.$$.fragment,e),k(Te.$$.fragment,e),Ul=!0)},o(e){j(n.$$.fragment,e),j(M),j(x.$$.fragment,e),j(q),j(Se.$$.fragment,e),j(Oe.$$.fragment,e),j(Be.$$.fragment,e),j(R),j(Q),j(J),j(X),j(Z),j(We.$$.fragment,e),j(se),j(Ke.$$.fragment,e),j(le),j(re),j(oe),j(es.$$.fragment,e),j(ss.$$.fragment,e),j(Te.$$.fragment,e),Ul=!1},d(e){s(l),e&&s(f),P(n,e),e&&s(d),e&&s(b),e&&s(w),ts[A].d(e),e&&s(y),P(x,e),e&&s($),ls[E].d(e),e&&s(S),e&&s(je),e&&s(Wt),P(Se,e),e&&s(Xt),e&&s(_s),e&&s(Kt),P(Oe,e),e&&s(Zt),e&&s(ke),e&&s(el),e&&s(he),e&&s(sl),e&&s(bs),e&&s(tl),e&&s(ze),e&&s(ll),e&&s(Ee),e&&s(nl),e&&s(ce),e&&s(rl),e&&s(z),e&&s(al),e&&s(G),e&&s(ol),P(Be,e),e&&s(pl),e&&s(hs),e&&s(il),e&&s(ve),e&&s(cl),e&&s(we),e&&s(fl),ns[B].d(e),e&&s($s),e&&s(js),e&&s(ul),rs[U].d(e),e&&s(ks),e&&s(N),e&&s(ml),e&&s(Re),e&&s(_l),as[Y].d(e),e&&s(Es),e&&s(vs),e&&s(dl),e&&s(H),e&&s(bl),e&&s(ws),e&&s(hl),e&&s(fe),e&&s($l),e&&s(Ue),e&&s(jl),e&&s(gs),e&&s(kl),e&&s(ue),e&&s(El),e&&s(Ms),e&&s(vl),e&&s(Fs),e&&s(wl),os[W].d(e),e&&s(As),e&&s(V),e&&s(yl),e&&s(Qe),e&&s(gl),e&&s(xs),e&&s(Tl),e&&s($e),e&&s(Cl),e&&s(Is),e&&s(Pl),e&&s(qs),e&&s(Ml),e&&s(Ds),e&&s(Fl),e&&s(D),e&&s(Al),ps[K].d(e),e&&s(Os),e&&s(Ns),e&&s(xl),P(We,e),e&&s(Il),is[ee].d(e),e&&s(Ls),e&&s(zs),e&&s(ql),e&&s(Xe),e&&s(Dl),e&&s(Gs),e&&s(Sl),P(Ke,e),e&&s(Ol),cs[te].d(e),e&&s(Hs),e&&s(L),e&&s(Nl),fs[ne].d(e),e&&s(Vs),us[ae].d(e),e&&s(Bs),e&&s(me),e&&s(Ll),e&&s(ye),e&&s(zl),P(es,e),e&&s(Gl),P(ss,e),e&&s(Hl),e&&s(Rs),e&&s(Vl),e&&s(ge),e&&s(Bl),e&&s(Us),e&&s(Rl),P(Te,e)}}}const Wp={local:"",sections:[{local:"",title:"\u4F7F\u7528\u5206\u8BCD\u5668\u8FDB\u884C\u9884\u5904\u7406"},{local:"",sections:[{local:"",title:"\u9AD8\u7EF4\u5411\u91CF\uFF1F"},{local:"",title:"\u6A21\u578B\u5934\uFF1A\u6570\u5B57\u7684\u610F\u4E49"}],title:"\u6D4F\u89C8\u6A21\u578B"},{local:"",title:"\u5BF9\u8F93\u51FA\u8FDB\u884C\u540E\u5904\u7406"}],title:"\u7BA1\u9053\u7684\u5185\u90E8"};function Xp(v,l,f){let n="pt";return wp(()=>{const d=new URLSearchParams(window.location.search);f(0,n=d.get("fw")||"pt")}),[n]}class ri extends jp{constructor(l){super();kp(this,l,Xp,Jp,Ep,{})}}export{ri as default,Wp as metadata};
