import{s as Fe,o as Be,n as pt}from"../chunks/scheduler.56730f09.js";import{S as Ee,i as Qe,g as b,s as r,r as u,A as qe,h as j,f as l,c as o,j as Ne,u as d,x as T,k as ze,y as Se,a,v as $,d as h,t as M,w as g,m as Le,n as Ae}from"../chunks/index.1f144517.js";import{T as Et}from"../chunks/Tip.41e845e5.js";import{Y as Pe}from"../chunks/Youtube.62e0f062.js";import{C as W}from"../chunks/CodeBlock.738eeccb.js";import{D as De}from"../chunks/DocNotebookDropdown.243c3df7.js";import{F as we,M as zt}from"../chunks/Markdown.3289e0dc.js";import{H as Nt,E as Ke}from"../chunks/EditOnGithub.854793f1.js";function Oe(k){let e,m='이 작업과 호환되는 모든 아키텍처와 체크포인트를 보려면 <a href="https://huggingface.co/tasks/text-classification" rel="nofollow">작업 페이지</a>를 확인하는 것이 좋습니다.';return{c(){e=b("p"),e.innerHTML=m},l(s){e=j(s,"P",{"data-svelte-h":!0}),T(e)!=="svelte-1oqtndz"&&(e.innerHTML=m)},m(s,c){a(s,e,c)},p:pt,d(s){s&&l(e)}}}function ts(k){let e,m;return e=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERhdGFDb2xsYXRvcldpdGhQYWRkaW5nJTBBJTBBZGF0YV9jb2xsYXRvciUyMCUzRCUyMERhdGFDb2xsYXRvcldpdGhQYWRkaW5nKHRva2VuaXplciUzRHRva2VuaXplcik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DataCollatorWithPadding

<span class="hljs-meta">&gt;&gt;&gt; </span>data_collator = DataCollatorWithPadding(tokenizer=tokenizer)`,wrap:!1}}),{c(){u(e.$$.fragment)},l(s){d(e.$$.fragment,s)},m(s,c){$(e,s,c),m=!0},p:pt,i(s){m||(h(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){g(e,s)}}}function es(k){let e,m;return e=new zt({props:{$$slots:{default:[ts]},$$scope:{ctx:k}}}),{c(){u(e.$$.fragment)},l(s){d(e.$$.fragment,s)},m(s,c){$(e,s,c),m=!0},p(s,c){const y={};c&2&&(y.$$scope={dirty:c,ctx:s}),e.$set(y)},i(s){m||(h(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){g(e,s)}}}function ss(k){let e,m;return e=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERhdGFDb2xsYXRvcldpdGhQYWRkaW5nJTBBJTBBZGF0YV9jb2xsYXRvciUyMCUzRCUyMERhdGFDb2xsYXRvcldpdGhQYWRkaW5nKHRva2VuaXplciUzRHRva2VuaXplciUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DataCollatorWithPadding

<span class="hljs-meta">&gt;&gt;&gt; </span>data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)`,wrap:!1}}),{c(){u(e.$$.fragment)},l(s){d(e.$$.fragment,s)},m(s,c){$(e,s,c),m=!0},p:pt,i(s){m||(h(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){g(e,s)}}}function ls(k){let e,m;return e=new zt({props:{$$slots:{default:[ss]},$$scope:{ctx:k}}}),{c(){u(e.$$.fragment)},l(s){d(e.$$.fragment,s)},m(s,c){$(e,s,c),m=!0},p(s,c){const y={};c&2&&(y.$$scope={dirty:c,ctx:s}),e.$set(y)},i(s){m||(h(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){g(e,s)}}}function as(k){let e,m='<code>Trainer</code>를 사용하여 모델을 파인 튜닝하는 방법에 익숙하지 않은 경우, <a href="../training#train-with-pytorch-trainer">여기</a>의 기본 튜토리얼을 확인하세요!';return{c(){e=b("p"),e.innerHTML=m},l(s){e=j(s,"P",{"data-svelte-h":!0}),T(e)!=="svelte-1wclifr"&&(e.innerHTML=m)},m(s,c){a(s,e,c)},p:pt,d(s){s&&l(e)}}}function ns(k){let e,m="<code>Trainer</code>는 <code>tokenizer</code>를 전달하면 기본적으로 동적 매핑을 적용합니다. 이 경우, 명시적으로 데이터 수집기를 지정할 필요가 없습니다.";return{c(){e=b("p"),e.innerHTML=m},l(s){e=j(s,"P",{"data-svelte-h":!0}),T(e)!=="svelte-1wp2ucv"&&(e.innerHTML=m)},m(s,c){a(s,e,c)},p:pt,d(s){s&&l(e)}}}function ps(k){let e,m,s,c="이제 모델을 훈련시킬 준비가 되었습니다! <code>AutoModelForSequenceClassification</code>로 DistilBERT를 가쳐오고 예상되는 레이블 수와 레이블 매핑을 지정하세요:",y,Z,V,v,C="이제 세 단계만 거치면 끝입니다:",R,_,N="<li><code>TrainingArguments</code>에서 하이퍼파라미터를 정의하세요. <code>output_dir</code>는 모델을 저장할 위치를 지정하는 유일한 파라미터입니다. 이 모델을 Hub에 업로드하기 위해 <code>push_to_hub=True</code>를 설정합니다. (모델을 업로드하기 위해 Hugging Face에 로그인해야합니다.) 각 에폭이 끝날 때마다, <code>Trainer</code>는 정확도를 평가하고 훈련 체크포인트를 저장합니다.</li> <li><code>Trainer</code>에 훈련 인수와 모델, 데이터셋, 토크나이저, 데이터 수집기 및 <code>compute_metrics</code> 함수를 전달하세요.</li> <li><code>train()</code>를 호출하여 모델은 파인 튜닝하세요.</li>",X,U,x,i,J,I,E="훈련이 완료되면, <code>push_to_hub()</code> 메소드를 사용하여 모델을 Hub에 공유할 수 있습니다.",H,z,Y;return e=new Et({props:{$$slots:{default:[as]},$$scope:{ctx:k}}}),Z=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMkMlMjBUcmFpbmluZ0FyZ3VtZW50cyUyQyUyMFRyYWluZXIlMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmRpc3RpbGJlcnQlMkZkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMiUyQyUyMG51bV9sYWJlbHMlM0QyJTJDJTIwaWQybGFiZWwlM0RpZDJsYWJlbCUyQyUyMGxhYmVsMmlkJTNEbGFiZWwyaWQlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSequenceClassification, TrainingArguments, Trainer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>, num_labels=<span class="hljs-number">2</span>, id2label=id2label, label2id=label2id
<span class="hljs-meta">... </span>)`,wrap:!1}}),U=new W({props:{code:"dHJhaW5pbmdfYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMG91dHB1dF9kaXIlM0QlMjJteV9hd2Vzb21lX21vZGVsJTIyJTJDJTBBJTIwJTIwJTIwJTIwbGVhcm5pbmdfcmF0ZSUzRDJlLTUlMkMlMEElMjAlMjAlMjAlMjBwZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlM0QxNiUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfZXZhbF9iYXRjaF9zaXplJTNEMTYlMkMlMEElMjAlMjAlMjAlMjBudW1fdHJhaW5fZXBvY2hzJTNEMiUyQyUwQSUyMCUyMCUyMCUyMHdlaWdodF9kZWNheSUzRDAuMDElMkMlMEElMjAlMjAlMjAlMjBldmFsX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBzYXZlX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBsb2FkX2Jlc3RfbW9kZWxfYXRfZW5kJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMHB1c2hfdG9faHViJTNEVHJ1ZSUyQyUwQSklMEElMEF0cmFpbmVyJTIwJTNEJTIwVHJhaW5lciglMEElMjAlMjAlMjAlMjBtb2RlbCUzRG1vZGVsJTJDJTBBJTIwJTIwJTIwJTIwYXJncyUzRHRyYWluaW5nX2FyZ3MlMkMlMEElMjAlMjAlMjAlMjB0cmFpbl9kYXRhc2V0JTNEdG9rZW5pemVkX2ltZGIlNUIlMjJ0cmFpbiUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMGV2YWxfZGF0YXNldCUzRHRva2VuaXplZF9pbWRiJTVCJTIydGVzdCUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHRva2VuaXplciUzRHRva2VuaXplciUyQyUwQSUyMCUyMCUyMCUyMGRhdGFfY29sbGF0b3IlM0RkYXRhX2NvbGxhdG9yJTJDJTBBJTIwJTIwJTIwJTIwY29tcHV0ZV9tZXRyaWNzJTNEY29tcHV0ZV9tZXRyaWNzJTJDJTBBKSUwQSUwQXRyYWluZXIudHJhaW4oKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>training_args = TrainingArguments(
<span class="hljs-meta">... </span>    output_dir=<span class="hljs-string">&quot;my_awesome_model&quot;</span>,
<span class="hljs-meta">... </span>    learning_rate=<span class="hljs-number">2e-5</span>,
<span class="hljs-meta">... </span>    per_device_train_batch_size=<span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>    per_device_eval_batch_size=<span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>    num_train_epochs=<span class="hljs-number">2</span>,
<span class="hljs-meta">... </span>    weight_decay=<span class="hljs-number">0.01</span>,
<span class="hljs-meta">... </span>    eval_strategy=<span class="hljs-string">&quot;epoch&quot;</span>,
<span class="hljs-meta">... </span>    save_strategy=<span class="hljs-string">&quot;epoch&quot;</span>,
<span class="hljs-meta">... </span>    load_best_model_at_end=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    push_to_hub=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer = Trainer(
<span class="hljs-meta">... </span>    model=model,
<span class="hljs-meta">... </span>    args=training_args,
<span class="hljs-meta">... </span>    train_dataset=tokenized_imdb[<span class="hljs-string">&quot;train&quot;</span>],
<span class="hljs-meta">... </span>    eval_dataset=tokenized_imdb[<span class="hljs-string">&quot;test&quot;</span>],
<span class="hljs-meta">... </span>    tokenizer=tokenizer,
<span class="hljs-meta">... </span>    data_collator=data_collator,
<span class="hljs-meta">... </span>    compute_metrics=compute_metrics,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.train()`,wrap:!1}}),i=new Et({props:{$$slots:{default:[ns]},$$scope:{ctx:k}}}),z=new W({props:{code:"dHJhaW5lci5wdXNoX3RvX2h1Yigp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.push_to_hub()',wrap:!1}}),{c(){u(e.$$.fragment),m=r(),s=b("p"),s.innerHTML=c,y=r(),u(Z.$$.fragment),V=r(),v=b("p"),v.textContent=C,R=r(),_=b("ol"),_.innerHTML=N,X=r(),u(U.$$.fragment),x=r(),u(i.$$.fragment),J=r(),I=b("p"),I.innerHTML=E,H=r(),u(z.$$.fragment)},l(f){d(e.$$.fragment,f),m=o(f),s=j(f,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1dpm8jo"&&(s.innerHTML=c),y=o(f),d(Z.$$.fragment,f),V=o(f),v=j(f,"P",{"data-svelte-h":!0}),T(v)!=="svelte-14zzcxs"&&(v.textContent=C),R=o(f),_=j(f,"OL",{"data-svelte-h":!0}),T(_)!=="svelte-637r6p"&&(_.innerHTML=N),X=o(f),d(U.$$.fragment,f),x=o(f),d(i.$$.fragment,f),J=o(f),I=j(f,"P",{"data-svelte-h":!0}),T(I)!=="svelte-1aylhkm"&&(I.innerHTML=E),H=o(f),d(z.$$.fragment,f)},m(f,G){$(e,f,G),a(f,m,G),a(f,s,G),a(f,y,G),$(Z,f,G),a(f,V,G),a(f,v,G),a(f,R,G),a(f,_,G),a(f,X,G),$(U,f,G),a(f,x,G),$(i,f,G),a(f,J,G),a(f,I,G),a(f,H,G),$(z,f,G),Y=!0},p(f,G){const F={};G&2&&(F.$$scope={dirty:G,ctx:f}),e.$set(F);const B={};G&2&&(B.$$scope={dirty:G,ctx:f}),i.$set(B)},i(f){Y||(h(e.$$.fragment,f),h(Z.$$.fragment,f),h(U.$$.fragment,f),h(i.$$.fragment,f),h(z.$$.fragment,f),Y=!0)},o(f){M(e.$$.fragment,f),M(Z.$$.fragment,f),M(U.$$.fragment,f),M(i.$$.fragment,f),M(z.$$.fragment,f),Y=!1},d(f){f&&(l(m),l(s),l(y),l(V),l(v),l(R),l(_),l(X),l(x),l(J),l(I),l(H)),g(e,f),g(Z,f),g(U,f),g(i,f),g(z,f)}}}function is(k){let e,m;return e=new zt({props:{$$slots:{default:[ps]},$$scope:{ctx:k}}}),{c(){u(e.$$.fragment)},l(s){d(e.$$.fragment,s)},m(s,c){$(e,s,c),m=!0},p(s,c){const y={};c&2&&(y.$$scope={dirty:c,ctx:s}),e.$set(y)},i(s){m||(h(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){g(e,s)}}}function rs(k){let e,m='Keras를 사용하여 모델을 파인 튜닝하는 방법에 익숙하지 않은 경우, <a href="../training#train-a-tensorflow-model-with-keras">여기</a>의 기본 튜토리얼을 확인하세요!';return{c(){e=b("p"),e.innerHTML=m},l(s){e=j(s,"P",{"data-svelte-h":!0}),T(e)!=="svelte-nkj0lu"&&(e.innerHTML=m)},m(s,c){a(s,e,c)},p:pt,d(s){s&&l(e)}}}function os(k){let e,m,s,c,y,Z="그런 다음 <code>TFAutoModelForSequenceClassification</code>을 사용하여 DistilBERT를 로드하고, 예상되는 레이블 수와 레이블 매핑을 로드할 수 있습니다:",V,v,C,R,_="<code>prepare_tf_dataset()</code>을 사용하여 데이터셋을 <code>tf.data.Dataset</code> 형식으로 변환합니다:",N,X,U,x,i='<a href="https://keras.io/api/models/model_training_apis/#compile-method" rel="nofollow"><code>compile</code></a>를 사용하여 훈련할 모델을 구성합니다:',J,I,E,H,z='훈련을 시작하기 전에 설정해야할 마지막 두 가지는 예측에서 정확도를 계산하고, 모델을 Hub에 업로드할 방법을 제공하는 것입니다. 모두 <a href="../main_classes/keras_callbacks">Keras callbacks</a>를 사용하여 수행됩니다.',Y,f,G="<code>KerasMetricCallback</code>에 <code>compute_metrics</code>를 전달하여 정확도를 높입니다.",F,B,Q,st,ct="<code>PushToHubCallback</code>에서 모델과 토크나이저를 업로드할 위치를 지정합니다:",q,S,L,A,lt="그런 다음 콜백을 함께 묶습니다:",ft,P,D,K,at='드디어, 모델 훈련을 시작할 준비가 되었습니다! <a href="https://keras.io/api/models/model_training_apis/#fit-method" rel="nofollow"><code>fit</code></a>에 훈련 데이터셋, 검증 데이터셋, 에폭의 수 및 콜백을 전달하여 파인 튜닝합니다:',ut,O,tt,et,nt="훈련이 완료되면, 모델이 자동으로 Hub에 업로드되어 모든 사람이 사용할 수 있습니다!",dt;return e=new Et({props:{$$slots:{default:[rs]},$$scope:{ctx:k}}}),s=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMGNyZWF0ZV9vcHRpbWl6ZXIlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQWJhdGNoX3NpemUlMjAlM0QlMjAxNiUwQW51bV9lcG9jaHMlMjAlM0QlMjA1JTBBYmF0Y2hlc19wZXJfZXBvY2glMjAlM0QlMjBsZW4odG9rZW5pemVkX2ltZGIlNUIlMjJ0cmFpbiUyMiU1RCklMjAlMkYlMkYlMjBiYXRjaF9zaXplJTBBdG90YWxfdHJhaW5fc3RlcHMlMjAlM0QlMjBpbnQoYmF0Y2hlc19wZXJfZXBvY2glMjAqJTIwbnVtX2Vwb2NocyklMEFvcHRpbWl6ZXIlMkMlMjBzY2hlZHVsZSUyMCUzRCUyMGNyZWF0ZV9vcHRpbWl6ZXIoaW5pdF9sciUzRDJlLTUlMkMlMjBudW1fd2FybXVwX3N0ZXBzJTNEMCUyQyUyMG51bV90cmFpbl9zdGVwcyUzRHRvdGFsX3RyYWluX3N0ZXBzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> create_optimizer
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>batch_size = <span class="hljs-number">16</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_epochs = <span class="hljs-number">5</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>batches_per_epoch = <span class="hljs-built_in">len</span>(tokenized_imdb[<span class="hljs-string">&quot;train&quot;</span>]) // batch_size
<span class="hljs-meta">&gt;&gt;&gt; </span>total_train_steps = <span class="hljs-built_in">int</span>(batches_per_epoch * num_epochs)
<span class="hljs-meta">&gt;&gt;&gt; </span>optimizer, schedule = create_optimizer(init_lr=<span class="hljs-number">2e-5</span>, num_warmup_steps=<span class="hljs-number">0</span>, num_train_steps=total_train_steps)`,wrap:!1}}),v=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwVEZBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIlMkMlMjBudW1fbGFiZWxzJTNEMiUyQyUyMGlkMmxhYmVsJTNEaWQybGFiZWwlMkMlMjBsYWJlbDJpZCUzRGxhYmVsMmlkJTBBKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>, num_labels=<span class="hljs-number">2</span>, id2label=id2label, label2id=label2id
<span class="hljs-meta">... </span>)`,wrap:!1}}),X=new W({props:{code:"dGZfdHJhaW5fc2V0JTIwJTNEJTIwbW9kZWwucHJlcGFyZV90Zl9kYXRhc2V0KCUwQSUyMCUyMCUyMCUyMHRva2VuaXplZF9pbWRiJTVCJTIydHJhaW4lMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBzaHVmZmxlJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMGJhdGNoX3NpemUlM0QxNiUyQyUwQSUyMCUyMCUyMCUyMGNvbGxhdGVfZm4lM0RkYXRhX2NvbGxhdG9yJTJDJTBBKSUwQSUwQXRmX3ZhbGlkYXRpb25fc2V0JTIwJTNEJTIwbW9kZWwucHJlcGFyZV90Zl9kYXRhc2V0KCUwQSUyMCUyMCUyMCUyMHRva2VuaXplZF9pbWRiJTVCJTIydGVzdCUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHNodWZmbGUlM0RGYWxzZSUyQyUwQSUyMCUyMCUyMCUyMGJhdGNoX3NpemUlM0QxNiUyQyUwQSUyMCUyMCUyMCUyMGNvbGxhdGVfZm4lM0RkYXRhX2NvbGxhdG9yJTJDJTBBKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>tf_train_set = model.prepare_tf_dataset(
<span class="hljs-meta">... </span>    tokenized_imdb[<span class="hljs-string">&quot;train&quot;</span>],
<span class="hljs-meta">... </span>    shuffle=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    batch_size=<span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>    collate_fn=data_collator,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>tf_validation_set = model.prepare_tf_dataset(
<span class="hljs-meta">... </span>    tokenized_imdb[<span class="hljs-string">&quot;test&quot;</span>],
<span class="hljs-meta">... </span>    shuffle=<span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    batch_size=<span class="hljs-number">16</span>,
<span class="hljs-meta">... </span>    collate_fn=data_collator,
<span class="hljs-meta">... </span>)`,wrap:!1}}),I=new W({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEFtb2RlbC5jb21waWxlKG9wdGltaXplciUzRG9wdGltaXplcik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>model.<span class="hljs-built_in">compile</span>(optimizer=optimizer)`,wrap:!1}}),B=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5rZXJhc19jYWxsYmFja3MlMjBpbXBvcnQlMjBLZXJhc01ldHJpY0NhbGxiYWNrJTBBJTBBbWV0cmljX2NhbGxiYWNrJTIwJTNEJTIwS2VyYXNNZXRyaWNDYWxsYmFjayhtZXRyaWNfZm4lM0Rjb21wdXRlX21ldHJpY3MlMkMlMjBldmFsX2RhdGFzZXQlM0R0Zl92YWxpZGF0aW9uX3NldCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.keras_callbacks <span class="hljs-keyword">import</span> KerasMetricCallback

<span class="hljs-meta">&gt;&gt;&gt; </span>metric_callback = KerasMetricCallback(metric_fn=compute_metrics, eval_dataset=tf_validation_set)`,wrap:!1}}),S=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5rZXJhc19jYWxsYmFja3MlMjBpbXBvcnQlMjBQdXNoVG9IdWJDYWxsYmFjayUwQSUwQXB1c2hfdG9faHViX2NhbGxiYWNrJTIwJTNEJTIwUHVzaFRvSHViQ2FsbGJhY2soJTBBJTIwJTIwJTIwJTIwb3V0cHV0X2RpciUzRCUyMm15X2F3ZXNvbWVfbW9kZWwlMjIlMkMlMEElMjAlMjAlMjAlMjB0b2tlbml6ZXIlM0R0b2tlbml6ZXIlMkMlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.keras_callbacks <span class="hljs-keyword">import</span> PushToHubCallback

<span class="hljs-meta">&gt;&gt;&gt; </span>push_to_hub_callback = PushToHubCallback(
<span class="hljs-meta">... </span>    output_dir=<span class="hljs-string">&quot;my_awesome_model&quot;</span>,
<span class="hljs-meta">... </span>    tokenizer=tokenizer,
<span class="hljs-meta">... </span>)`,wrap:!1}}),P=new W({props:{code:"Y2FsbGJhY2tzJTIwJTNEJTIwJTVCbWV0cmljX2NhbGxiYWNrJTJDJTIwcHVzaF90b19odWJfY2FsbGJhY2slNUQ=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>callbacks = [metric_callback, push_to_hub_callback]',wrap:!1}}),O=new W({props:{code:"bW9kZWwuZml0KHglM0R0Zl90cmFpbl9zZXQlMkMlMjB2YWxpZGF0aW9uX2RhdGElM0R0Zl92YWxpZGF0aW9uX3NldCUyQyUyMGVwb2NocyUzRDMlMkMlMjBjYWxsYmFja3MlM0RjYWxsYmFja3Mp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>model.fit(x=tf_train_set, validation_data=tf_validation_set, epochs=<span class="hljs-number">3</span>, callbacks=callbacks)',wrap:!1}}),{c(){u(e.$$.fragment),m=Le(`
TensorFlow에서 모델을 파인 튜닝하려면, 먼저 옵티마이저 함수와 학습률 스케쥴, 그리고 일부 훈련 하이퍼파라미터를 설정해야 합니다:

	`),u(s.$$.fragment),c=r(),y=b("p"),y.innerHTML=Z,V=r(),u(v.$$.fragment),C=r(),R=b("p"),R.innerHTML=_,N=r(),u(X.$$.fragment),U=r(),x=b("p"),x.innerHTML=i,J=r(),u(I.$$.fragment),E=r(),H=b("p"),H.innerHTML=z,Y=r(),f=b("p"),f.innerHTML=G,F=r(),u(B.$$.fragment),Q=r(),st=b("p"),st.innerHTML=ct,q=r(),u(S.$$.fragment),L=r(),A=b("p"),A.textContent=lt,ft=r(),u(P.$$.fragment),D=r(),K=b("p"),K.innerHTML=at,ut=r(),u(O.$$.fragment),tt=r(),et=b("p"),et.textContent=nt},l(p){d(e.$$.fragment,p),m=Ae(p,`
TensorFlow에서 모델을 파인 튜닝하려면, 먼저 옵티마이저 함수와 학습률 스케쥴, 그리고 일부 훈련 하이퍼파라미터를 설정해야 합니다:

	`),d(s.$$.fragment,p),c=o(p),y=j(p,"P",{"data-svelte-h":!0}),T(y)!=="svelte-1lnro8f"&&(y.innerHTML=Z),V=o(p),d(v.$$.fragment,p),C=o(p),R=j(p,"P",{"data-svelte-h":!0}),T(R)!=="svelte-1hxq7ff"&&(R.innerHTML=_),N=o(p),d(X.$$.fragment,p),U=o(p),x=j(p,"P",{"data-svelte-h":!0}),T(x)!=="svelte-qrlpiv"&&(x.innerHTML=i),J=o(p),d(I.$$.fragment,p),E=o(p),H=j(p,"P",{"data-svelte-h":!0}),T(H)!=="svelte-i81jhu"&&(H.innerHTML=z),Y=o(p),f=j(p,"P",{"data-svelte-h":!0}),T(f)!=="svelte-6lp9q9"&&(f.innerHTML=G),F=o(p),d(B.$$.fragment,p),Q=o(p),st=j(p,"P",{"data-svelte-h":!0}),T(st)!=="svelte-1ilfuc9"&&(st.innerHTML=ct),q=o(p),d(S.$$.fragment,p),L=o(p),A=j(p,"P",{"data-svelte-h":!0}),T(A)!=="svelte-90s2we"&&(A.textContent=lt),ft=o(p),d(P.$$.fragment,p),D=o(p),K=j(p,"P",{"data-svelte-h":!0}),T(K)!=="svelte-1ub0tax"&&(K.innerHTML=at),ut=o(p),d(O.$$.fragment,p),tt=o(p),et=j(p,"P",{"data-svelte-h":!0}),T(et)!=="svelte-14vf2pa"&&(et.textContent=nt)},m(p,w){$(e,p,w),a(p,m,w),$(s,p,w),a(p,c,w),a(p,y,w),a(p,V,w),$(v,p,w),a(p,C,w),a(p,R,w),a(p,N,w),$(X,p,w),a(p,U,w),a(p,x,w),a(p,J,w),$(I,p,w),a(p,E,w),a(p,H,w),a(p,Y,w),a(p,f,w),a(p,F,w),$(B,p,w),a(p,Q,w),a(p,st,w),a(p,q,w),$(S,p,w),a(p,L,w),a(p,A,w),a(p,ft,w),$(P,p,w),a(p,D,w),a(p,K,w),a(p,ut,w),$(O,p,w),a(p,tt,w),a(p,et,w),dt=!0},p(p,w){const Ft={};w&2&&(Ft.$$scope={dirty:w,ctx:p}),e.$set(Ft)},i(p){dt||(h(e.$$.fragment,p),h(s.$$.fragment,p),h(v.$$.fragment,p),h(X.$$.fragment,p),h(I.$$.fragment,p),h(B.$$.fragment,p),h(S.$$.fragment,p),h(P.$$.fragment,p),h(O.$$.fragment,p),dt=!0)},o(p){M(e.$$.fragment,p),M(s.$$.fragment,p),M(v.$$.fragment,p),M(X.$$.fragment,p),M(I.$$.fragment,p),M(B.$$.fragment,p),M(S.$$.fragment,p),M(P.$$.fragment,p),M(O.$$.fragment,p),dt=!1},d(p){p&&(l(m),l(c),l(y),l(V),l(C),l(R),l(N),l(U),l(x),l(J),l(E),l(H),l(Y),l(f),l(F),l(Q),l(st),l(q),l(L),l(A),l(ft),l(D),l(K),l(ut),l(tt),l(et)),g(e,p),g(s,p),g(v,p),g(X,p),g(I,p),g(B,p),g(S,p),g(P,p),g(O,p)}}}function ms(k){let e,m;return e=new zt({props:{$$slots:{default:[os]},$$scope:{ctx:k}}}),{c(){u(e.$$.fragment)},l(s){d(e.$$.fragment,s)},m(s,c){$(e,s,c),m=!0},p(s,c){const y={};c&2&&(y.$$scope={dirty:c,ctx:s}),e.$set(y)},i(s){m||(h(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){g(e,s)}}}function cs(k){let e,m='텍스트 분류를 위한 모델을 파인 튜닝하는 자세한 예제는 다음 <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb" rel="nofollow">PyTorch notebook</a> 또는 <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb" rel="nofollow">TensorFlow notebook</a>를 참조하세요.';return{c(){e=b("p"),e.innerHTML=m},l(s){e=j(s,"P",{"data-svelte-h":!0}),T(e)!=="svelte-105n05r"&&(e.innerHTML=m)},m(s,c){a(s,e,c)},p:pt,d(s){s&&l(e)}}}function fs(k){let e,m="텍스트를 토큰화하고 PyTorch 텐서를 반환합니다.",s,c,y,Z,V="입력을 모델에 전달하고 <code>logits</code>을 반환합니다:",v,C,R,_,N="가장 높은 확률을 가진 클래스를 모델의 <code>id2label</code> 매핑을 사용하여 텍스트 레이블로 변환합니다:",X,U,x;return c=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJzdGV2aGxpdSUyRm15X2F3ZXNvbWVfbW9kZWwlMjIpJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKQ==",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;stevhliu/my_awesome_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`,wrap:!1}}),C=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnN0ZXZobGl1JTJGbXlfYXdlc29tZV9tb2RlbCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;stevhliu/my_awesome_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits`,wrap:!1}}),U=new W({props:{code:"cHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQW1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;POSITIVE&#x27;</span>`,wrap:!1}}),{c(){e=b("p"),e.textContent=m,s=r(),u(c.$$.fragment),y=r(),Z=b("p"),Z.innerHTML=V,v=r(),u(C.$$.fragment),R=r(),_=b("p"),_.innerHTML=N,X=r(),u(U.$$.fragment)},l(i){e=j(i,"P",{"data-svelte-h":!0}),T(e)!=="svelte-1f989ch"&&(e.textContent=m),s=o(i),d(c.$$.fragment,i),y=o(i),Z=j(i,"P",{"data-svelte-h":!0}),T(Z)!=="svelte-1hjuppo"&&(Z.innerHTML=V),v=o(i),d(C.$$.fragment,i),R=o(i),_=j(i,"P",{"data-svelte-h":!0}),T(_)!=="svelte-1jbp04u"&&(_.innerHTML=N),X=o(i),d(U.$$.fragment,i)},m(i,J){a(i,e,J),a(i,s,J),$(c,i,J),a(i,y,J),a(i,Z,J),a(i,v,J),$(C,i,J),a(i,R,J),a(i,_,J),a(i,X,J),$(U,i,J),x=!0},p:pt,i(i){x||(h(c.$$.fragment,i),h(C.$$.fragment,i),h(U.$$.fragment,i),x=!0)},o(i){M(c.$$.fragment,i),M(C.$$.fragment,i),M(U.$$.fragment,i),x=!1},d(i){i&&(l(e),l(s),l(y),l(Z),l(v),l(R),l(_),l(X)),g(c,i),g(C,i),g(U,i)}}}function us(k){let e,m;return e=new zt({props:{$$slots:{default:[fs]},$$scope:{ctx:k}}}),{c(){u(e.$$.fragment)},l(s){d(e.$$.fragment,s)},m(s,c){$(e,s,c),m=!0},p(s,c){const y={};c&2&&(y.$$scope={dirty:c,ctx:s}),e.$set(y)},i(s){m||(h(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){g(e,s)}}}function ds(k){let e,m="텍스트를 토큰화하고 TensorFlow 텐서를 반환합니다:",s,c,y,Z,V="입력값을 모델에 전달하고 <code>logits</code>을 반환합니다:",v,C,R,_,N="가장 높은 확률을 가진 클래스를 모델의 <code>id2label</code> 매핑을 사용하여 텍스트 레이블로 변환합니다:",X,U,x;return c=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJzdGV2aGxpdSUyRm15X2F3ZXNvbWVfbW9kZWwlMjIpJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKQ==",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;stevhliu/my_awesome_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)`,wrap:!1}}),C=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwVEZBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJzdGV2aGxpdSUyRm15X2F3ZXNvbWVfbW9kZWwlMjIpJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;stevhliu/my_awesome_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits`,wrap:!1}}),U=new W({props:{code:"cHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQW1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;POSITIVE&#x27;</span>`,wrap:!1}}),{c(){e=b("p"),e.textContent=m,s=r(),u(c.$$.fragment),y=r(),Z=b("p"),Z.innerHTML=V,v=r(),u(C.$$.fragment),R=r(),_=b("p"),_.innerHTML=N,X=r(),u(U.$$.fragment)},l(i){e=j(i,"P",{"data-svelte-h":!0}),T(e)!=="svelte-1m12ipr"&&(e.textContent=m),s=o(i),d(c.$$.fragment,i),y=o(i),Z=j(i,"P",{"data-svelte-h":!0}),T(Z)!=="svelte-tcnp5y"&&(Z.innerHTML=V),v=o(i),d(C.$$.fragment,i),R=o(i),_=j(i,"P",{"data-svelte-h":!0}),T(_)!=="svelte-1jbp04u"&&(_.innerHTML=N),X=o(i),d(U.$$.fragment,i)},m(i,J){a(i,e,J),a(i,s,J),$(c,i,J),a(i,y,J),a(i,Z,J),a(i,v,J),$(C,i,J),a(i,R,J),a(i,_,J),a(i,X,J),$(U,i,J),x=!0},p:pt,i(i){x||(h(c.$$.fragment,i),h(C.$$.fragment,i),h(U.$$.fragment,i),x=!0)},o(i){M(c.$$.fragment,i),M(C.$$.fragment,i),M(U.$$.fragment,i),x=!1},d(i){i&&(l(e),l(s),l(y),l(Z),l(v),l(R),l(_),l(X)),g(c,i),g(C,i),g(U,i)}}}function $s(k){let e,m;return e=new zt({props:{$$slots:{default:[ds]},$$scope:{ctx:k}}}),{c(){u(e.$$.fragment)},l(s){d(e.$$.fragment,s)},m(s,c){$(e,s,c),m=!0},p(s,c){const y={};c&2&&(y.$$scope={dirty:c,ctx:s}),e.$set(y)},i(s){m||(h(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){g(e,s)}}}function hs(k){let e,m,s,c,y,Z,V,v,C,R,_,N="텍스트 분류는 자연어 처리의 일종으로, 텍스트에 레이블 또는 클래스를 지정하는 작업입니다. 많은 대기업이 다양한 실용적인 응용 분야에서 텍스트 분류를 운영하고 있습니다. 가장 인기 있는 텍스트 분류 형태 중 하나는 감성 분석으로, 텍스트 시퀀스에 🙂 긍정, 🙁 부정 또는 😐 중립과 같은 레이블을 지정합니다.",X,U,x="이 가이드에서 학습할 내용은:",i,J,I='<li><a href="https://huggingface.co/datasets/imdb" rel="nofollow">IMDb</a> 데이터셋에서 <a href="https://huggingface.co/distilbert/distilbert-base-uncased" rel="nofollow">DistilBERT</a>를 파인 튜닝하여 영화 리뷰가 긍정적인지 부정적인지 판단합니다.</li> <li>추론을 위해 파인 튜닝 모델을 사용합니다.</li>',E,H,z,Y,f="시작하기 전에, 필요한 모든 라이브러리가 설치되어 있는지 확인하세요:",G,F,B,Q,st="Hugging Face 계정에 로그인하여 모델을 업로드하고 커뮤니티에 공유하는 것을 권장합니다. 메시지가 표시되면, 토큰을 입력하여 로그인하세요:",ct,q,S,L,A,lt,ft="먼저 🤗 Datasets 라이브러리에서 IMDb 데이터셋을 가져옵니다:",P,D,K,at,ut="그런 다음 예시를 살펴봅시다:",O,tt,et,nt,dt="이 데이터셋에는 두 가지 필드가 있습니다:",p,w,Ft="<li><code>text</code>: 영화 리뷰 텍스트</li> <li><code>label</code>: <code>0</code>은 부정적인 리뷰, <code>1</code>은 긍정적인 리뷰를 나타냅니다.</li>",Qt,$t,qt,ht,Te="다음 단계는 DistilBERT 토크나이저를 가져와서 <code>text</code> 필드를 전처리하는 것입니다:",St,Mt,Lt,gt,Je="<code>text</code>를 토큰화하고 시퀀스가 DistilBERT의 최대 입력 길이보다 길지 않도록 자르기 위한 전처리 함수를 생성하세요:",At,yt,Pt,bt,Ue="전체 데이터셋에 전처리 함수를 적용하려면, 🤗 Datasets <code>map</code> 함수를 사용하세요. 데이터셋의 여러 요소를 한 번에 처리하기 위해 <code>batched=True</code>로 설정함으로써 데이터셋 <code>map</code>를 더 빠르게 처리할 수 있습니다:",Dt,jt,Kt,wt,_e="이제 <code>DataCollatorWithPadding</code>를 사용하여 예제 배치를 만들어봅시다. 데이터셋 전체를 최대 길이로 패딩하는 대신, <em>동적 패딩</em>을 사용하여 배치에서 가장 긴 길이에 맞게 문장을 패딩하는 것이 효율적입니다.",Ot,it,te,Tt,ee,Jt,ke='훈련 중 모델의 성능을 평가하기 위해 메트릭을 포함하는 것이 유용합니다. 🤗 <a href="https://huggingface.co/docs/evaluate/index" rel="nofollow">Evaluate</a> 라이브러리를 사용하여 빠르게 평가 방법을 로드할 수 있습니다. 이 작업에서는 <a href="https://huggingface.co/spaces/evaluate-metric/accuracy" rel="nofollow">accuracy</a> 메트릭을 가져옵니다. (메트릭을 가져오고 계산하는 방법에 대해서는 🤗 Evaluate <a href="https://huggingface.co/docs/evaluate/a_quick_tour" rel="nofollow">quick tour</a>를 참조하세요):',se,Ut,le,_t,Ze="그런 다음 <code>compute_metrics</code> 함수를 만들어서 예측과 레이블을 계산하여 정확도를 계산하도록 <code>compute</code>를 호출합니다:",ae,kt,ne,Zt,Ce="이제 <code>compute_metrics</code> 함수는 준비되었고, 훈련 과정을 설정할 때 다시 살펴볼 예정입니다.",pe,Ct,ie,Wt,We="모델을 훈련하기 전에, <code>id2label</code>와 <code>label2id</code>를 사용하여 예상되는 id와 레이블의 맵을 생성하세요:",re,vt,oe,rt,me,ot,ce,Gt,fe,Rt,ve="좋아요, 이제 모델을 파인 튜닝했으니 추론에 사용할 수 있습니다!",ue,Xt,Ge="추론을 수행하고자 하는 텍스트를 가져와봅시다:",de,xt,$e,Vt,Re="파인 튜닝된 모델로 추론을 시도하는 가장 간단한 방법은 <code>pipeline()</code>를 사용하는 것입니다. 모델로 감정 분석을 위한 <code>pipeline</code>을 인스턴스화하고, 텍스트를 전달해보세요:",he,Ht,Me,It,Xe="원한다면, <code>pipeline</code>의 결과를 수동으로 복제할 수도 있습니다.",ge,mt,ye,Yt,be,Bt,je;return y=new Nt({props:{title:"텍스트 분류",local:"text-classification",headingTag:"h1"}}),V=new De({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/ko/sequence_classification.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/sequence_classification.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/sequence_classification.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/sequence_classification.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/sequence_classification.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/sequence_classification.ipynb"}]}}),C=new Pe({props:{id:"leNG9fN9FQU"}}),H=new Et({props:{$$slots:{default:[Oe]},$$scope:{ctx:k}}}),F=new W({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyUyMGRhdGFzZXRzJTIwZXZhbHVhdGU=",highlighted:"pip install transformers datasets evaluate",wrap:!1}}),q=new W({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG5vdGVib29rX2xvZ2luJTBBJTBBbm90ZWJvb2tfbG9naW4oKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login

<span class="hljs-meta">&gt;&gt;&gt; </span>notebook_login()`,wrap:!1}}),L=new Nt({props:{title:"IMDb 데이터셋 가져오기",local:"load-imdb-dataset",headingTag:"h2"}}),D=new W({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBaW1kYiUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJpbWRiJTIyKQ==",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>imdb = load_dataset(<span class="hljs-string">&quot;imdb&quot;</span>)`,wrap:!1}}),tt=new W({props:{code:"aW1kYiU1QiUyMnRlc3QlMjIlNUQlNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>imdb[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-number">0</span>]
{
    <span class="hljs-string">&quot;label&quot;</span>: <span class="hljs-number">0</span>,
    <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;I love sci-fi and am willing to put up with a lot. Sci-fi movies/TV are usually underfunded, under-appreciated and misunderstood. I tried to like this, I really did, but it is to good TV sci-fi as Babylon 5 is to Star Trek (the original). Silly prosthetics, cheap cardboard sets, stilted dialogues, CG that doesn&#x27;t match the background, and painfully one-dimensional characters cannot be overcome with a &#x27;sci-fi&#x27; setting. (I&#x27;m sure there are those of you out there who think Babylon 5 is good sci-fi TV. It&#x27;s not. It&#x27;s clichéd and uninspiring.) While US viewers might like emotion and character development, sci-fi is a genre that does not take itself seriously (cf. Star Trek). It may treat important issues, yet not as a serious philosophy. It&#x27;s really difficult to care about the characters here as they are not simply foolish, just missing a spark of life. Their actions and reactions are wooden and predictable, often painful to watch. The makers of Earth KNOW it&#x27;s rubbish as they have to always say \\&quot;Gene Roddenberry&#x27;s Earth...\\&quot; otherwise people would not continue watching. Roddenberry&#x27;s ashes must be turning in their orbit as this dull, cheap, poorly edited (watching it without advert breaks really brings this home) trudging Trabant of a show lumbers into space. Spoiler. So, kill off a main character. And then bring him back as another actor. Jeeez! Dallas all over again.&quot;</span>,
}`,wrap:!1}}),$t=new Nt({props:{title:"전처리",local:"preprocess",headingTag:"h2"}}),Mt=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIp",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;distilbert/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),yt=new W({props:{code:"ZGVmJTIwcHJlcHJvY2Vzc19mdW5jdGlvbihleGFtcGxlcyklM0ElMEElMjAlMjAlMjAlMjByZXR1cm4lMjB0b2tlbml6ZXIoZXhhbXBsZXMlNUIlMjJ0ZXh0JTIyJTVEJTJDJTIwdHJ1bmNhdGlvbiUzRFRydWUp",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>    <span class="hljs-keyword">return</span> tokenizer(examples[<span class="hljs-string">&quot;text&quot;</span>], truncation=<span class="hljs-literal">True</span>)`,wrap:!1}}),jt=new W({props:{code:"dG9rZW5pemVkX2ltZGIlMjAlM0QlMjBpbWRiLm1hcChwcmVwcm9jZXNzX2Z1bmN0aW9uJTJDJTIwYmF0Y2hlZCUzRFRydWUp",highlighted:'tokenized_imdb = imdb.<span class="hljs-built_in">map</span>(preprocess_function, batched=<span class="hljs-literal">True</span>)',wrap:!1}}),it=new we({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ls],pytorch:[es]},$$scope:{ctx:k}}}),Tt=new Nt({props:{title:"평가하기",local:"evaluate",headingTag:"h2"}}),Ut=new W({props:{code:"aW1wb3J0JTIwZXZhbHVhdGUlMEElMEFhY2N1cmFjeSUyMCUzRCUyMGV2YWx1YXRlLmxvYWQoJTIyYWNjdXJhY3klMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> evaluate

<span class="hljs-meta">&gt;&gt;&gt; </span>accuracy = evaluate.load(<span class="hljs-string">&quot;accuracy&quot;</span>)`,wrap:!1}}),kt=new W({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBJTBBZGVmJTIwY29tcHV0ZV9tZXRyaWNzKGV2YWxfcHJlZCklM0ElMEElMjAlMjAlMjAlMjBwcmVkaWN0aW9ucyUyQyUyMGxhYmVscyUyMCUzRCUyMGV2YWxfcHJlZCUwQSUyMCUyMCUyMCUyMHByZWRpY3Rpb25zJTIwJTNEJTIwbnAuYXJnbWF4KHByZWRpY3Rpb25zJTJDJTIwYXhpcyUzRDEpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwYWNjdXJhY3kuY29tcHV0ZShwcmVkaWN0aW9ucyUzRHByZWRpY3Rpb25zJTJDJTIwcmVmZXJlbmNlcyUzRGxhYmVscyk=",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">def</span> <span class="hljs-title function_">compute_metrics</span>(<span class="hljs-params">eval_pred</span>):
<span class="hljs-meta">... </span>    predictions, labels = eval_pred
<span class="hljs-meta">... </span>    predictions = np.argmax(predictions, axis=<span class="hljs-number">1</span>)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> accuracy.compute(predictions=predictions, references=labels)`,wrap:!1}}),Ct=new Nt({props:{title:"훈련",local:"train",headingTag:"h2"}}),vt=new W({props:{code:"aWQybGFiZWwlMjAlM0QlMjAlN0IwJTNBJTIwJTIyTkVHQVRJVkUlMjIlMkMlMjAxJTNBJTIwJTIyUE9TSVRJVkUlMjIlN0QlMEFsYWJlbDJpZCUyMCUzRCUyMCU3QiUyMk5FR0FUSVZFJTIyJTNBJTIwMCUyQyUyMCUyMlBPU0lUSVZFJTIyJTNBJTIwMSU3RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>id2label = {<span class="hljs-number">0</span>: <span class="hljs-string">&quot;NEGATIVE&quot;</span>, <span class="hljs-number">1</span>: <span class="hljs-string">&quot;POSITIVE&quot;</span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>label2id = {<span class="hljs-string">&quot;NEGATIVE&quot;</span>: <span class="hljs-number">0</span>, <span class="hljs-string">&quot;POSITIVE&quot;</span>: <span class="hljs-number">1</span>}`,wrap:!1}}),rt=new we({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ms],pytorch:[is]},$$scope:{ctx:k}}}),ot=new Et({props:{$$slots:{default:[cs]},$$scope:{ctx:k}}}),Gt=new Nt({props:{title:"추론",local:"inference",headingTag:"h2"}}),xt=new W({props:{code:"dGV4dCUyMCUzRCUyMCUyMlRoaXMlMjB3YXMlMjBhJTIwbWFzdGVycGllY2UuJTIwTm90JTIwY29tcGxldGVseSUyMGZhaXRoZnVsJTIwdG8lMjB0aGUlMjBib29rcyUyQyUyMGJ1dCUyMGVudGhyYWxsaW5nJTIwZnJvbSUyMGJlZ2lubmluZyUyMHRvJTIwZW5kLiUyME1pZ2h0JTIwYmUlMjBteSUyMGZhdm9yaXRlJTIwb2YlMjB0aGUlMjB0aHJlZS4lMjI=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;This was a masterpiece. Not completely faithful to the books, but enthralling from beginning to end. Might be my favorite of the three.&quot;</span>',wrap:!1}}),Ht=new W({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKCUyMnNlbnRpbWVudC1hbmFseXNpcyUyMiUyQyUyMG1vZGVsJTNEJTIyc3RldmhsaXUlMkZteV9hd2Vzb21lX21vZGVsJTIyKSUwQWNsYXNzaWZpZXIodGV4dCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>classifier = pipeline(<span class="hljs-string">&quot;sentiment-analysis&quot;</span>, model=<span class="hljs-string">&quot;stevhliu/my_awesome_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(text)
[{<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.9994940757751465</span>}]`,wrap:!1}}),mt=new we({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[$s],pytorch:[us]},$$scope:{ctx:k}}}),Yt=new Ke({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/tasks/sequence_classification.md"}}),{c(){e=b("meta"),m=r(),s=b("p"),c=r(),u(y.$$.fragment),Z=r(),u(V.$$.fragment),v=r(),u(C.$$.fragment),R=r(),_=b("p"),_.textContent=N,X=r(),U=b("p"),U.textContent=x,i=r(),J=b("ol"),J.innerHTML=I,E=r(),u(H.$$.fragment),z=r(),Y=b("p"),Y.textContent=f,G=r(),u(F.$$.fragment),B=r(),Q=b("p"),Q.textContent=st,ct=r(),u(q.$$.fragment),S=r(),u(L.$$.fragment),A=r(),lt=b("p"),lt.textContent=ft,P=r(),u(D.$$.fragment),K=r(),at=b("p"),at.textContent=ut,O=r(),u(tt.$$.fragment),et=r(),nt=b("p"),nt.textContent=dt,p=r(),w=b("ul"),w.innerHTML=Ft,Qt=r(),u($t.$$.fragment),qt=r(),ht=b("p"),ht.innerHTML=Te,St=r(),u(Mt.$$.fragment),Lt=r(),gt=b("p"),gt.innerHTML=Je,At=r(),u(yt.$$.fragment),Pt=r(),bt=b("p"),bt.innerHTML=Ue,Dt=r(),u(jt.$$.fragment),Kt=r(),wt=b("p"),wt.innerHTML=_e,Ot=r(),u(it.$$.fragment),te=r(),u(Tt.$$.fragment),ee=r(),Jt=b("p"),Jt.innerHTML=ke,se=r(),u(Ut.$$.fragment),le=r(),_t=b("p"),_t.innerHTML=Ze,ae=r(),u(kt.$$.fragment),ne=r(),Zt=b("p"),Zt.innerHTML=Ce,pe=r(),u(Ct.$$.fragment),ie=r(),Wt=b("p"),Wt.innerHTML=We,re=r(),u(vt.$$.fragment),oe=r(),u(rt.$$.fragment),me=r(),u(ot.$$.fragment),ce=r(),u(Gt.$$.fragment),fe=r(),Rt=b("p"),Rt.textContent=ve,ue=r(),Xt=b("p"),Xt.textContent=Ge,de=r(),u(xt.$$.fragment),$e=r(),Vt=b("p"),Vt.innerHTML=Re,he=r(),u(Ht.$$.fragment),Me=r(),It=b("p"),It.innerHTML=Xe,ge=r(),u(mt.$$.fragment),ye=r(),u(Yt.$$.fragment),be=r(),Bt=b("p"),this.h()},l(t){const n=qe("svelte-u9bgzb",document.head);e=j(n,"META",{name:!0,content:!0}),n.forEach(l),m=o(t),s=j(t,"P",{}),Ne(s).forEach(l),c=o(t),d(y.$$.fragment,t),Z=o(t),d(V.$$.fragment,t),v=o(t),d(C.$$.fragment,t),R=o(t),_=j(t,"P",{"data-svelte-h":!0}),T(_)!=="svelte-u67xp1"&&(_.textContent=N),X=o(t),U=j(t,"P",{"data-svelte-h":!0}),T(U)!=="svelte-14hiaa1"&&(U.textContent=x),i=o(t),J=j(t,"OL",{"data-svelte-h":!0}),T(J)!=="svelte-10cs0j"&&(J.innerHTML=I),E=o(t),d(H.$$.fragment,t),z=o(t),Y=j(t,"P",{"data-svelte-h":!0}),T(Y)!=="svelte-1bc8bfk"&&(Y.textContent=f),G=o(t),d(F.$$.fragment,t),B=o(t),Q=j(t,"P",{"data-svelte-h":!0}),T(Q)!=="svelte-1hhyu5y"&&(Q.textContent=st),ct=o(t),d(q.$$.fragment,t),S=o(t),d(L.$$.fragment,t),A=o(t),lt=j(t,"P",{"data-svelte-h":!0}),T(lt)!=="svelte-71u4tm"&&(lt.textContent=ft),P=o(t),d(D.$$.fragment,t),K=o(t),at=j(t,"P",{"data-svelte-h":!0}),T(at)!=="svelte-18cnd8l"&&(at.textContent=ut),O=o(t),d(tt.$$.fragment,t),et=o(t),nt=j(t,"P",{"data-svelte-h":!0}),T(nt)!=="svelte-nfqprk"&&(nt.textContent=dt),p=o(t),w=j(t,"UL",{"data-svelte-h":!0}),T(w)!=="svelte-z448yg"&&(w.innerHTML=Ft),Qt=o(t),d($t.$$.fragment,t),qt=o(t),ht=j(t,"P",{"data-svelte-h":!0}),T(ht)!=="svelte-1t0711w"&&(ht.innerHTML=Te),St=o(t),d(Mt.$$.fragment,t),Lt=o(t),gt=j(t,"P",{"data-svelte-h":!0}),T(gt)!=="svelte-1lyhad1"&&(gt.innerHTML=Je),At=o(t),d(yt.$$.fragment,t),Pt=o(t),bt=j(t,"P",{"data-svelte-h":!0}),T(bt)!=="svelte-y65sjr"&&(bt.innerHTML=Ue),Dt=o(t),d(jt.$$.fragment,t),Kt=o(t),wt=j(t,"P",{"data-svelte-h":!0}),T(wt)!=="svelte-1i6efmb"&&(wt.innerHTML=_e),Ot=o(t),d(it.$$.fragment,t),te=o(t),d(Tt.$$.fragment,t),ee=o(t),Jt=j(t,"P",{"data-svelte-h":!0}),T(Jt)!=="svelte-16fyv40"&&(Jt.innerHTML=ke),se=o(t),d(Ut.$$.fragment,t),le=o(t),_t=j(t,"P",{"data-svelte-h":!0}),T(_t)!=="svelte-1wr52zz"&&(_t.innerHTML=Ze),ae=o(t),d(kt.$$.fragment,t),ne=o(t),Zt=j(t,"P",{"data-svelte-h":!0}),T(Zt)!=="svelte-11m7xom"&&(Zt.innerHTML=Ce),pe=o(t),d(Ct.$$.fragment,t),ie=o(t),Wt=j(t,"P",{"data-svelte-h":!0}),T(Wt)!=="svelte-84b3vk"&&(Wt.innerHTML=We),re=o(t),d(vt.$$.fragment,t),oe=o(t),d(rt.$$.fragment,t),me=o(t),d(ot.$$.fragment,t),ce=o(t),d(Gt.$$.fragment,t),fe=o(t),Rt=j(t,"P",{"data-svelte-h":!0}),T(Rt)!=="svelte-1r6hgyn"&&(Rt.textContent=ve),ue=o(t),Xt=j(t,"P",{"data-svelte-h":!0}),T(Xt)!=="svelte-ej1eir"&&(Xt.textContent=Ge),de=o(t),d(xt.$$.fragment,t),$e=o(t),Vt=j(t,"P",{"data-svelte-h":!0}),T(Vt)!=="svelte-hpekrl"&&(Vt.innerHTML=Re),he=o(t),d(Ht.$$.fragment,t),Me=o(t),It=j(t,"P",{"data-svelte-h":!0}),T(It)!=="svelte-1kfpoxm"&&(It.innerHTML=Xe),ge=o(t),d(mt.$$.fragment,t),ye=o(t),d(Yt.$$.fragment,t),be=o(t),Bt=j(t,"P",{}),Ne(Bt).forEach(l),this.h()},h(){ze(e,"name","hf:doc:metadata"),ze(e,"content",Ms)},m(t,n){Se(document.head,e),a(t,m,n),a(t,s,n),a(t,c,n),$(y,t,n),a(t,Z,n),$(V,t,n),a(t,v,n),$(C,t,n),a(t,R,n),a(t,_,n),a(t,X,n),a(t,U,n),a(t,i,n),a(t,J,n),a(t,E,n),$(H,t,n),a(t,z,n),a(t,Y,n),a(t,G,n),$(F,t,n),a(t,B,n),a(t,Q,n),a(t,ct,n),$(q,t,n),a(t,S,n),$(L,t,n),a(t,A,n),a(t,lt,n),a(t,P,n),$(D,t,n),a(t,K,n),a(t,at,n),a(t,O,n),$(tt,t,n),a(t,et,n),a(t,nt,n),a(t,p,n),a(t,w,n),a(t,Qt,n),$($t,t,n),a(t,qt,n),a(t,ht,n),a(t,St,n),$(Mt,t,n),a(t,Lt,n),a(t,gt,n),a(t,At,n),$(yt,t,n),a(t,Pt,n),a(t,bt,n),a(t,Dt,n),$(jt,t,n),a(t,Kt,n),a(t,wt,n),a(t,Ot,n),$(it,t,n),a(t,te,n),$(Tt,t,n),a(t,ee,n),a(t,Jt,n),a(t,se,n),$(Ut,t,n),a(t,le,n),a(t,_t,n),a(t,ae,n),$(kt,t,n),a(t,ne,n),a(t,Zt,n),a(t,pe,n),$(Ct,t,n),a(t,ie,n),a(t,Wt,n),a(t,re,n),$(vt,t,n),a(t,oe,n),$(rt,t,n),a(t,me,n),$(ot,t,n),a(t,ce,n),$(Gt,t,n),a(t,fe,n),a(t,Rt,n),a(t,ue,n),a(t,Xt,n),a(t,de,n),$(xt,t,n),a(t,$e,n),a(t,Vt,n),a(t,he,n),$(Ht,t,n),a(t,Me,n),a(t,It,n),a(t,ge,n),$(mt,t,n),a(t,ye,n),$(Yt,t,n),a(t,be,n),a(t,Bt,n),je=!0},p(t,[n]){const xe={};n&2&&(xe.$$scope={dirty:n,ctx:t}),H.$set(xe);const Ve={};n&2&&(Ve.$$scope={dirty:n,ctx:t}),it.$set(Ve);const He={};n&2&&(He.$$scope={dirty:n,ctx:t}),rt.$set(He);const Ie={};n&2&&(Ie.$$scope={dirty:n,ctx:t}),ot.$set(Ie);const Ye={};n&2&&(Ye.$$scope={dirty:n,ctx:t}),mt.$set(Ye)},i(t){je||(h(y.$$.fragment,t),h(V.$$.fragment,t),h(C.$$.fragment,t),h(H.$$.fragment,t),h(F.$$.fragment,t),h(q.$$.fragment,t),h(L.$$.fragment,t),h(D.$$.fragment,t),h(tt.$$.fragment,t),h($t.$$.fragment,t),h(Mt.$$.fragment,t),h(yt.$$.fragment,t),h(jt.$$.fragment,t),h(it.$$.fragment,t),h(Tt.$$.fragment,t),h(Ut.$$.fragment,t),h(kt.$$.fragment,t),h(Ct.$$.fragment,t),h(vt.$$.fragment,t),h(rt.$$.fragment,t),h(ot.$$.fragment,t),h(Gt.$$.fragment,t),h(xt.$$.fragment,t),h(Ht.$$.fragment,t),h(mt.$$.fragment,t),h(Yt.$$.fragment,t),je=!0)},o(t){M(y.$$.fragment,t),M(V.$$.fragment,t),M(C.$$.fragment,t),M(H.$$.fragment,t),M(F.$$.fragment,t),M(q.$$.fragment,t),M(L.$$.fragment,t),M(D.$$.fragment,t),M(tt.$$.fragment,t),M($t.$$.fragment,t),M(Mt.$$.fragment,t),M(yt.$$.fragment,t),M(jt.$$.fragment,t),M(it.$$.fragment,t),M(Tt.$$.fragment,t),M(Ut.$$.fragment,t),M(kt.$$.fragment,t),M(Ct.$$.fragment,t),M(vt.$$.fragment,t),M(rt.$$.fragment,t),M(ot.$$.fragment,t),M(Gt.$$.fragment,t),M(xt.$$.fragment,t),M(Ht.$$.fragment,t),M(mt.$$.fragment,t),M(Yt.$$.fragment,t),je=!1},d(t){t&&(l(m),l(s),l(c),l(Z),l(v),l(R),l(_),l(X),l(U),l(i),l(J),l(E),l(z),l(Y),l(G),l(B),l(Q),l(ct),l(S),l(A),l(lt),l(P),l(K),l(at),l(O),l(et),l(nt),l(p),l(w),l(Qt),l(qt),l(ht),l(St),l(Lt),l(gt),l(At),l(Pt),l(bt),l(Dt),l(Kt),l(wt),l(Ot),l(te),l(ee),l(Jt),l(se),l(le),l(_t),l(ae),l(ne),l(Zt),l(pe),l(ie),l(Wt),l(re),l(oe),l(me),l(ce),l(fe),l(Rt),l(ue),l(Xt),l(de),l($e),l(Vt),l(he),l(Me),l(It),l(ge),l(ye),l(be),l(Bt)),l(e),g(y,t),g(V,t),g(C,t),g(H,t),g(F,t),g(q,t),g(L,t),g(D,t),g(tt,t),g($t,t),g(Mt,t),g(yt,t),g(jt,t),g(it,t),g(Tt,t),g(Ut,t),g(kt,t),g(Ct,t),g(vt,t),g(rt,t),g(ot,t),g(Gt,t),g(xt,t),g(Ht,t),g(mt,t),g(Yt,t)}}}const Ms='{"title":"텍스트 분류","local":"text-classification","sections":[{"title":"IMDb 데이터셋 가져오기","local":"load-imdb-dataset","sections":[],"depth":2},{"title":"전처리","local":"preprocess","sections":[],"depth":2},{"title":"평가하기","local":"evaluate","sections":[],"depth":2},{"title":"훈련","local":"train","sections":[],"depth":2},{"title":"추론","local":"inference","sections":[],"depth":2}],"depth":1}';function gs(k){return Be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ks extends Ee{constructor(e){super(),Qe(this,e,gs,hs,Fe,{})}}export{ks as component};
