import{s as ze,o as Be,n as pt}from"../chunks/scheduler.bdbef820.js";import{S as Ee,i as Qe,g as y,s as i,r as u,A as qe,h as j,f as l,c as o,j as Ne,u as h,x as T,k as Fe,y as Se,a,v as d,d as $,t as M,w as b,m as Le,n as Ae}from"../chunks/index.33f81d56.js";import{T as Et}from"../chunks/Tip.34194030.js";import{Y as Pe}from"../chunks/Youtube.0e329b00.js";import{C as W}from"../chunks/CodeBlock.362b34a4.js";import{D as De}from"../chunks/DocNotebookDropdown.d5db5928.js";import{F as we,M as Ft}from"../chunks/Markdown.03194dea.js";import{H as Nt,E as Ke}from"../chunks/EditOnGithub.a9246e21.js";function Oe(k){let e,m='이 작업과 호환되는 모든 아키텍처와 체크포인트를 보려면 <a href="https://huggingface.co/tasks/text-classification" rel="nofollow">작업 페이지</a>를 확인하는 것이 좋습니다.';return{c(){e=y("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){h(e.$$.fragment,s)},m(s,c){d(e,s,c),m=!0},p:pt,i(s){m||($(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){b(e,s)}}}function es(k){let e,m;return e=new Ft({props:{$$slots:{default:[ts]},$$scope:{ctx:k}}}),{c(){u(e.$$.fragment)},l(s){h(e.$$.fragment,s)},m(s,c){d(e,s,c),m=!0},p(s,c){const g={};c&2&&(g.$$scope={dirty:c,ctx:s}),e.$set(g)},i(s){m||($(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){b(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){h(e.$$.fragment,s)},m(s,c){d(e,s,c),m=!0},p:pt,i(s){m||($(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){b(e,s)}}}function ls(k){let e,m;return e=new Ft({props:{$$slots:{default:[ss]},$$scope:{ctx:k}}}),{c(){u(e.$$.fragment)},l(s){h(e.$$.fragment,s)},m(s,c){d(e,s,c),m=!0},p(s,c){const g={};c&2&&(g.$$scope={dirty:c,ctx:s}),e.$set(g)},i(s){m||($(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){b(e,s)}}}function as(k){let e,m='<a href="/docs/transformers/pr_30530/ko/main_classes/trainer#transformers.Trainer">Trainer</a>를 사용하여 모델을 파인 튜닝하는 방법에 익숙하지 않은 경우, <a href="../training#train-with-pytorch-trainer">여기</a>의 기본 튜토리얼을 확인하세요!';return{c(){e=y("p"),e.innerHTML=m},l(s){e=j(s,"P",{"data-svelte-h":!0}),T(e)!=="svelte-1t1xn4f"&&(e.innerHTML=m)},m(s,c){a(s,e,c)},p:pt,d(s){s&&l(e)}}}function ns(k){let e,m='<a href="/docs/transformers/pr_30530/ko/main_classes/trainer#transformers.Trainer">Trainer</a>는 <code>tokenizer</code>를 전달하면 기본적으로 동적 매핑을 적용합니다. 이 경우, 명시적으로 데이터 수집기를 지정할 필요가 없습니다.';return{c(){e=y("p"),e.innerHTML=m},l(s){e=j(s,"P",{"data-svelte-h":!0}),T(e)!=="svelte-1mi8iyf"&&(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='이제 모델을 훈련시킬 준비가 되었습니다! <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.AutoModelForSequenceClassification">AutoModelForSequenceClassification</a>로 DistilBERT를 가쳐오고 예상되는 레이블 수와 레이블 매핑을 지정하세요:',g,Z,V,v,C="이제 세 단계만 거치면 끝입니다:",x,U,N='<li><a href="/docs/transformers/pr_30530/ko/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a>에서 하이퍼파라미터를 정의하세요. <code>output_dir</code>는 모델을 저장할 위치를 지정하는 유일한 파라미터입니다. 이 모델을 Hub에 업로드하기 위해 <code>push_to_hub=True</code>를 설정합니다. (모델을 업로드하기 위해 Hugging Face에 로그인해야합니다.) 각 에폭이 끝날 때마다, <a href="/docs/transformers/pr_30530/ko/main_classes/trainer#transformers.Trainer">Trainer</a>는 정확도를 평가하고 훈련 체크포인트를 저장합니다.</li> <li><a href="/docs/transformers/pr_30530/ko/main_classes/trainer#transformers.Trainer">Trainer</a>에 훈련 인수와 모델, 데이터셋, 토크나이저, 데이터 수집기 및 <code>compute_metrics</code> 함수를 전달하세요.</li> <li><a href="/docs/transformers/pr_30530/ko/main_classes/trainer#transformers.Trainer.train">train()</a>를 호출하여 모델은 파인 튜닝하세요.</li>',R,J,X,r,_,Y,E='훈련이 완료되면, <a href="/docs/transformers/pr_30530/ko/main_classes/trainer#transformers.Trainer.push_to_hub">push_to_hub()</a> 메소드를 사용하여 모델을 Hub에 공유할 수 있습니다.',H,F,I;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}}),J=new W({props:{code:"dHJhaW5pbmdfYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMG91dHB1dF9kaXIlM0QlMjJteV9hd2Vzb21lX21vZGVsJTIyJTJDJTBBJTIwJTIwJTIwJTIwbGVhcm5pbmdfcmF0ZSUzRDJlLTUlMkMlMEElMjAlMjAlMjAlMjBwZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlM0QxNiUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfZXZhbF9iYXRjaF9zaXplJTNEMTYlMkMlMEElMjAlMjAlMjAlMjBudW1fdHJhaW5fZXBvY2hzJTNEMiUyQyUwQSUyMCUyMCUyMCUyMHdlaWdodF9kZWNheSUzRDAuMDElMkMlMEElMjAlMjAlMjAlMjBldmFsX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBzYXZlX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBsb2FkX2Jlc3RfbW9kZWxfYXRfZW5kJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMHB1c2hfdG9faHViJTNEVHJ1ZSUyQyUwQSklMEElMEF0cmFpbmVyJTIwJTNEJTIwVHJhaW5lciglMEElMjAlMjAlMjAlMjBtb2RlbCUzRG1vZGVsJTJDJTBBJTIwJTIwJTIwJTIwYXJncyUzRHRyYWluaW5nX2FyZ3MlMkMlMEElMjAlMjAlMjAlMjB0cmFpbl9kYXRhc2V0JTNEdG9rZW5pemVkX2ltZGIlNUIlMjJ0cmFpbiUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMGV2YWxfZGF0YXNldCUzRHRva2VuaXplZF9pbWRiJTVCJTIydGVzdCUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHByb2Nlc3NpbmdfY2xhc3MlM0R0b2tlbml6ZXIlMkMlMEElMjAlMjAlMjAlMjBkYXRhX2NvbGxhdG9yJTNEZGF0YV9jb2xsYXRvciUyQyUwQSUyMCUyMCUyMCUyMGNvbXB1dGVfbWV0cmljcyUzRGNvbXB1dGVfbWV0cmljcyUyQyUwQSklMEElMEF0cmFpbmVyLnRyYWluKCk=",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>    processing_class=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}}),r=new Et({props:{$$slots:{default:[ns]},$$scope:{ctx:k}}}),F=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=i(),s=y("p"),s.innerHTML=c,g=i(),u(Z.$$.fragment),V=i(),v=y("p"),v.textContent=C,x=i(),U=y("ol"),U.innerHTML=N,R=i(),u(J.$$.fragment),X=i(),u(r.$$.fragment),_=i(),Y=y("p"),Y.innerHTML=E,H=i(),u(F.$$.fragment)},l(f){h(e.$$.fragment,f),m=o(f),s=j(f,"P",{"data-svelte-h":!0}),T(s)!=="svelte-ubkqqd"&&(s.innerHTML=c),g=o(f),h(Z.$$.fragment,f),V=o(f),v=j(f,"P",{"data-svelte-h":!0}),T(v)!=="svelte-14zzcxs"&&(v.textContent=C),x=o(f),U=j(f,"OL",{"data-svelte-h":!0}),T(U)!=="svelte-hcx5ty"&&(U.innerHTML=N),R=o(f),h(J.$$.fragment,f),X=o(f),h(r.$$.fragment,f),_=o(f),Y=j(f,"P",{"data-svelte-h":!0}),T(Y)!=="svelte-trohre"&&(Y.innerHTML=E),H=o(f),h(F.$$.fragment,f)},m(f,G){d(e,f,G),a(f,m,G),a(f,s,G),a(f,g,G),d(Z,f,G),a(f,V,G),a(f,v,G),a(f,x,G),a(f,U,G),a(f,R,G),d(J,f,G),a(f,X,G),d(r,f,G),a(f,_,G),a(f,Y,G),a(f,H,G),d(F,f,G),I=!0},p(f,G){const z={};G&2&&(z.$$scope={dirty:G,ctx:f}),e.$set(z);const B={};G&2&&(B.$$scope={dirty:G,ctx:f}),r.$set(B)},i(f){I||($(e.$$.fragment,f),$(Z.$$.fragment,f),$(J.$$.fragment,f),$(r.$$.fragment,f),$(F.$$.fragment,f),I=!0)},o(f){M(e.$$.fragment,f),M(Z.$$.fragment,f),M(J.$$.fragment,f),M(r.$$.fragment,f),M(F.$$.fragment,f),I=!1},d(f){f&&(l(m),l(s),l(g),l(V),l(v),l(x),l(U),l(R),l(X),l(_),l(Y),l(H)),b(e,f),b(Z,f),b(J,f),b(r,f),b(F,f)}}}function rs(k){let e,m;return e=new Ft({props:{$$slots:{default:[ps]},$$scope:{ctx:k}}}),{c(){u(e.$$.fragment)},l(s){h(e.$$.fragment,s)},m(s,c){d(e,s,c),m=!0},p(s,c){const g={};c&2&&(g.$$scope={dirty:c,ctx:s}),e.$set(g)},i(s){m||($(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){b(e,s)}}}function is(k){let e,m='Keras를 사용하여 모델을 파인 튜닝하는 방법에 익숙하지 않은 경우, <a href="../training#train-a-tensorflow-model-with-keras">여기</a>의 기본 튜토리얼을 확인하세요!';return{c(){e=y("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,g,Z='그런 다음 <a href="/docs/transformers/pr_30530/ko/model_doc/auto#transformers.TFAutoModelForSequenceClassification">TFAutoModelForSequenceClassification</a>을 사용하여 DistilBERT를 로드하고, 예상되는 레이블 수와 레이블 매핑을 로드할 수 있습니다:',V,v,C,x,U='<a href="/docs/transformers/pr_30530/ko/main_classes/model#transformers.TFPreTrainedModel.prepare_tf_dataset">prepare_tf_dataset()</a>을 사용하여 데이터셋을 <code>tf.data.Dataset</code> 형식으로 변환합니다:',N,R,J,X,r='<a href="https://keras.io/api/models/model_training_apis/#compile-method" rel="nofollow"><code>compile</code></a>를 사용하여 훈련할 모델을 구성합니다:',_,Y,E,H,F='훈련을 시작하기 전에 설정해야할 마지막 두 가지는 예측에서 정확도를 계산하고, 모델을 Hub에 업로드할 방법을 제공하는 것입니다. 모두 <a href="../main_classes/keras_callbacks">Keras callbacks</a>를 사용하여 수행됩니다.',I,f,G='<a href="/docs/transformers/pr_30530/ko/main_classes/keras_callbacks#transformers.KerasMetricCallback">KerasMetricCallback</a>에 <code>compute_metrics</code>를 전달하여 정확도를 높입니다.',z,B,Q,st,ct='<a href="/docs/transformers/pr_30530/ko/main_classes/keras_callbacks#transformers.PushToHubCallback">PushToHubCallback</a>에서 모델과 토크나이저를 업로드할 위치를 지정합니다:',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에 업로드되어 모든 사람이 사용할 수 있습니다!",ht;return e=new Et({props:{$$slots:{default:[is]},$$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}}),R=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}}),Y=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=i(),g=y("p"),g.innerHTML=Z,V=i(),u(v.$$.fragment),C=i(),x=y("p"),x.innerHTML=U,N=i(),u(R.$$.fragment),J=i(),X=y("p"),X.innerHTML=r,_=i(),u(Y.$$.fragment),E=i(),H=y("p"),H.innerHTML=F,I=i(),f=y("p"),f.innerHTML=G,z=i(),u(B.$$.fragment),Q=i(),st=y("p"),st.innerHTML=ct,q=i(),u(S.$$.fragment),L=i(),A=y("p"),A.textContent=lt,ft=i(),u(P.$$.fragment),D=i(),K=y("p"),K.innerHTML=at,ut=i(),u(O.$$.fragment),tt=i(),et=y("p"),et.textContent=nt},l(p){h(e.$$.fragment,p),m=Ae(p,`
TensorFlow에서 모델을 파인 튜닝하려면, 먼저 옵티마이저 함수와 학습률 스케쥴, 그리고 일부 훈련 하이퍼파라미터를 설정해야 합니다:

	`),h(s.$$.fragment,p),c=o(p),g=j(p,"P",{"data-svelte-h":!0}),T(g)!=="svelte-16tq1fu"&&(g.innerHTML=Z),V=o(p),h(v.$$.fragment,p),C=o(p),x=j(p,"P",{"data-svelte-h":!0}),T(x)!=="svelte-1gtckma"&&(x.innerHTML=U),N=o(p),h(R.$$.fragment,p),J=o(p),X=j(p,"P",{"data-svelte-h":!0}),T(X)!=="svelte-qrlpiv"&&(X.innerHTML=r),_=o(p),h(Y.$$.fragment,p),E=o(p),H=j(p,"P",{"data-svelte-h":!0}),T(H)!=="svelte-i81jhu"&&(H.innerHTML=F),I=o(p),f=j(p,"P",{"data-svelte-h":!0}),T(f)!=="svelte-114f50l"&&(f.innerHTML=G),z=o(p),h(B.$$.fragment,p),Q=o(p),st=j(p,"P",{"data-svelte-h":!0}),T(st)!=="svelte-1t0cys3"&&(st.innerHTML=ct),q=o(p),h(S.$$.fragment,p),L=o(p),A=j(p,"P",{"data-svelte-h":!0}),T(A)!=="svelte-90s2we"&&(A.textContent=lt),ft=o(p),h(P.$$.fragment,p),D=o(p),K=j(p,"P",{"data-svelte-h":!0}),T(K)!=="svelte-1ub0tax"&&(K.innerHTML=at),ut=o(p),h(O.$$.fragment,p),tt=o(p),et=j(p,"P",{"data-svelte-h":!0}),T(et)!=="svelte-14vf2pa"&&(et.textContent=nt)},m(p,w){d(e,p,w),a(p,m,w),d(s,p,w),a(p,c,w),a(p,g,w),a(p,V,w),d(v,p,w),a(p,C,w),a(p,x,w),a(p,N,w),d(R,p,w),a(p,J,w),a(p,X,w),a(p,_,w),d(Y,p,w),a(p,E,w),a(p,H,w),a(p,I,w),a(p,f,w),a(p,z,w),d(B,p,w),a(p,Q,w),a(p,st,w),a(p,q,w),d(S,p,w),a(p,L,w),a(p,A,w),a(p,ft,w),d(P,p,w),a(p,D,w),a(p,K,w),a(p,ut,w),d(O,p,w),a(p,tt,w),a(p,et,w),ht=!0},p(p,w){const zt={};w&2&&(zt.$$scope={dirty:w,ctx:p}),e.$set(zt)},i(p){ht||($(e.$$.fragment,p),$(s.$$.fragment,p),$(v.$$.fragment,p),$(R.$$.fragment,p),$(Y.$$.fragment,p),$(B.$$.fragment,p),$(S.$$.fragment,p),$(P.$$.fragment,p),$(O.$$.fragment,p),ht=!0)},o(p){M(e.$$.fragment,p),M(s.$$.fragment,p),M(v.$$.fragment,p),M(R.$$.fragment,p),M(Y.$$.fragment,p),M(B.$$.fragment,p),M(S.$$.fragment,p),M(P.$$.fragment,p),M(O.$$.fragment,p),ht=!1},d(p){p&&(l(m),l(c),l(g),l(V),l(C),l(x),l(N),l(J),l(X),l(_),l(E),l(H),l(I),l(f),l(z),l(Q),l(st),l(q),l(L),l(A),l(ft),l(D),l(K),l(ut),l(tt),l(et)),b(e,p),b(s,p),b(v,p),b(R,p),b(Y,p),b(B,p),b(S,p),b(P,p),b(O,p)}}}function ms(k){let e,m;return e=new Ft({props:{$$slots:{default:[os]},$$scope:{ctx:k}}}),{c(){u(e.$$.fragment)},l(s){h(e.$$.fragment,s)},m(s,c){d(e,s,c),m=!0},p(s,c){const g={};c&2&&(g.$$scope={dirty:c,ctx:s}),e.$set(g)},i(s){m||($(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){b(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=y("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,g,Z,V="입력을 모델에 전달하고 <code>logits</code>을 반환합니다:",v,C,x,U,N="가장 높은 확률을 가진 클래스를 모델의 <code>id2label</code> 매핑을 사용하여 텍스트 레이블로 변환합니다:",R,J,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}}),J=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=y("p"),e.textContent=m,s=i(),u(c.$$.fragment),g=i(),Z=y("p"),Z.innerHTML=V,v=i(),u(C.$$.fragment),x=i(),U=y("p"),U.innerHTML=N,R=i(),u(J.$$.fragment)},l(r){e=j(r,"P",{"data-svelte-h":!0}),T(e)!=="svelte-1f989ch"&&(e.textContent=m),s=o(r),h(c.$$.fragment,r),g=o(r),Z=j(r,"P",{"data-svelte-h":!0}),T(Z)!=="svelte-1hjuppo"&&(Z.innerHTML=V),v=o(r),h(C.$$.fragment,r),x=o(r),U=j(r,"P",{"data-svelte-h":!0}),T(U)!=="svelte-1jbp04u"&&(U.innerHTML=N),R=o(r),h(J.$$.fragment,r)},m(r,_){a(r,e,_),a(r,s,_),d(c,r,_),a(r,g,_),a(r,Z,_),a(r,v,_),d(C,r,_),a(r,x,_),a(r,U,_),a(r,R,_),d(J,r,_),X=!0},p:pt,i(r){X||($(c.$$.fragment,r),$(C.$$.fragment,r),$(J.$$.fragment,r),X=!0)},o(r){M(c.$$.fragment,r),M(C.$$.fragment,r),M(J.$$.fragment,r),X=!1},d(r){r&&(l(e),l(s),l(g),l(Z),l(v),l(x),l(U),l(R)),b(c,r),b(C,r),b(J,r)}}}function us(k){let e,m;return e=new Ft({props:{$$slots:{default:[fs]},$$scope:{ctx:k}}}),{c(){u(e.$$.fragment)},l(s){h(e.$$.fragment,s)},m(s,c){d(e,s,c),m=!0},p(s,c){const g={};c&2&&(g.$$scope={dirty:c,ctx:s}),e.$set(g)},i(s){m||($(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){b(e,s)}}}function hs(k){let e,m="텍스트를 토큰화하고 TensorFlow 텐서를 반환합니다:",s,c,g,Z,V="입력값을 모델에 전달하고 <code>logits</code>을 반환합니다:",v,C,x,U,N="가장 높은 확률을 가진 클래스를 모델의 <code>id2label</code> 매핑을 사용하여 텍스트 레이블로 변환합니다:",R,J,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}}),J=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=y("p"),e.textContent=m,s=i(),u(c.$$.fragment),g=i(),Z=y("p"),Z.innerHTML=V,v=i(),u(C.$$.fragment),x=i(),U=y("p"),U.innerHTML=N,R=i(),u(J.$$.fragment)},l(r){e=j(r,"P",{"data-svelte-h":!0}),T(e)!=="svelte-1m12ipr"&&(e.textContent=m),s=o(r),h(c.$$.fragment,r),g=o(r),Z=j(r,"P",{"data-svelte-h":!0}),T(Z)!=="svelte-tcnp5y"&&(Z.innerHTML=V),v=o(r),h(C.$$.fragment,r),x=o(r),U=j(r,"P",{"data-svelte-h":!0}),T(U)!=="svelte-1jbp04u"&&(U.innerHTML=N),R=o(r),h(J.$$.fragment,r)},m(r,_){a(r,e,_),a(r,s,_),d(c,r,_),a(r,g,_),a(r,Z,_),a(r,v,_),d(C,r,_),a(r,x,_),a(r,U,_),a(r,R,_),d(J,r,_),X=!0},p:pt,i(r){X||($(c.$$.fragment,r),$(C.$$.fragment,r),$(J.$$.fragment,r),X=!0)},o(r){M(c.$$.fragment,r),M(C.$$.fragment,r),M(J.$$.fragment,r),X=!1},d(r){r&&(l(e),l(s),l(g),l(Z),l(v),l(x),l(U),l(R)),b(c,r),b(C,r),b(J,r)}}}function ds(k){let e,m;return e=new Ft({props:{$$slots:{default:[hs]},$$scope:{ctx:k}}}),{c(){u(e.$$.fragment)},l(s){h(e.$$.fragment,s)},m(s,c){d(e,s,c),m=!0},p(s,c){const g={};c&2&&(g.$$scope={dirty:c,ctx:s}),e.$set(g)},i(s){m||($(e.$$.fragment,s),m=!0)},o(s){M(e.$$.fragment,s),m=!1},d(s){b(e,s)}}}function $s(k){let e,m,s,c,g,Z,V,v,C,x,U,N="텍스트 분류는 자연어 처리의 일종으로, 텍스트에 레이블 또는 클래스를 지정하는 작업입니다. 많은 대기업이 다양한 실용적인 응용 분야에서 텍스트 분류를 운영하고 있습니다. 가장 인기 있는 텍스트 분류 형태 중 하나는 감성 분석으로, 텍스트 시퀀스에 🙂 긍정, 🙁 부정 또는 😐 중립과 같은 레이블을 지정합니다.",R,J,X="이 가이드에서 학습할 내용은:",r,_,Y='<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,F,I,f="시작하기 전에, 필요한 모든 라이브러리가 설치되어 있는지 확인하세요:",G,z,B,Q,st="Hugging Face 계정에 로그인하여 모델을 업로드하고 커뮤니티에 공유하는 것을 권장합니다. 메시지가 표시되면, 토큰을 입력하여 로그인하세요:",ct,q,S,L,A,lt,ft="먼저 🤗 Datasets 라이브러리에서 IMDb 데이터셋을 가져옵니다:",P,D,K,at,ut="그런 다음 예시를 살펴봅시다:",O,tt,et,nt,ht="이 데이터셋에는 두 가지 필드가 있습니다:",p,w,zt="<li><code>text</code>: 영화 리뷰 텍스트</li> <li><code>label</code>: <code>0</code>은 부정적인 리뷰, <code>1</code>은 긍정적인 리뷰를 나타냅니다.</li>",Qt,dt,qt,$t,Te="다음 단계는 DistilBERT 토크나이저를 가져와서 <code>text</code> 필드를 전처리하는 것입니다:",St,Mt,Lt,bt,_e="<code>text</code>를 토큰화하고 시퀀스가 DistilBERT의 최대 입력 길이보다 길지 않도록 자르기 위한 전처리 함수를 생성하세요:",At,gt,Pt,yt,Je="전체 데이터셋에 전처리 함수를 적용하려면, 🤗 Datasets <code>map</code> 함수를 사용하세요. 데이터셋의 여러 요소를 한 번에 처리하기 위해 <code>batched=True</code>로 설정함으로써 데이터셋 <code>map</code>를 더 빠르게 처리할 수 있습니다:",Dt,jt,Kt,wt,Ue='이제 <a href="/docs/transformers/pr_30530/ko/main_classes/data_collator#transformers.DataCollatorWithPadding">DataCollatorWithPadding</a>를 사용하여 예제 배치를 만들어봅시다. 데이터셋 전체를 최대 길이로 패딩하는 대신, <em>동적 패딩</em>을 사용하여 배치에서 가장 긴 길이에 맞게 문장을 패딩하는 것이 효율적입니다.',Ot,rt,te,Tt,ee,_t,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,Jt,le,Ut,Ze="그런 다음 <code>compute_metrics</code> 함수를 만들어서 예측과 레이블을 계산하여 정확도를 계산하도록 <code>compute</code>를 호출합니다:",ae,kt,ne,Zt,Ce="이제 <code>compute_metrics</code> 함수는 준비되었고, 훈련 과정을 설정할 때 다시 살펴볼 예정입니다.",pe,Ct,re,Wt,We="모델을 훈련하기 전에, <code>id2label</code>와 <code>label2id</code>를 사용하여 예상되는 id와 레이블의 맵을 생성하세요:",ie,vt,oe,it,me,ot,ce,Gt,fe,xt,ve="좋아요, 이제 모델을 파인 튜닝했으니 추론에 사용할 수 있습니다!",ue,Rt,Ge="추론을 수행하고자 하는 텍스트를 가져와봅시다:",he,Xt,de,Vt,xe="파인 튜닝된 모델로 추론을 시도하는 가장 간단한 방법은 <code>pipeline()</code>를 사용하는 것입니다. 모델로 감정 분석을 위한 <code>pipeline</code>을 인스턴스화하고, 텍스트를 전달해보세요:",$e,Ht,Me,Yt,Re="원한다면, <code>pipeline</code>의 결과를 수동으로 복제할 수도 있습니다.",be,mt,ge,It,ye,Bt,je;return g=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}}}),z=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}}),dt=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}}),gt=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}}),rt=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"}}),Jt=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}}),it=new we({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ms],pytorch:[rs]},$$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:[ds],pytorch:[us]},$$scope:{ctx:k}}}),It=new Ke({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ko/tasks/sequence_classification.md"}}),{c(){e=y("meta"),m=i(),s=y("p"),c=i(),u(g.$$.fragment),Z=i(),u(V.$$.fragment),v=i(),u(C.$$.fragment),x=i(),U=y("p"),U.textContent=N,R=i(),J=y("p"),J.textContent=X,r=i(),_=y("ol"),_.innerHTML=Y,E=i(),u(H.$$.fragment),F=i(),I=y("p"),I.textContent=f,G=i(),u(z.$$.fragment),B=i(),Q=y("p"),Q.textContent=st,ct=i(),u(q.$$.fragment),S=i(),u(L.$$.fragment),A=i(),lt=y("p"),lt.textContent=ft,P=i(),u(D.$$.fragment),K=i(),at=y("p"),at.textContent=ut,O=i(),u(tt.$$.fragment),et=i(),nt=y("p"),nt.textContent=ht,p=i(),w=y("ul"),w.innerHTML=zt,Qt=i(),u(dt.$$.fragment),qt=i(),$t=y("p"),$t.innerHTML=Te,St=i(),u(Mt.$$.fragment),Lt=i(),bt=y("p"),bt.innerHTML=_e,At=i(),u(gt.$$.fragment),Pt=i(),yt=y("p"),yt.innerHTML=Je,Dt=i(),u(jt.$$.fragment),Kt=i(),wt=y("p"),wt.innerHTML=Ue,Ot=i(),u(rt.$$.fragment),te=i(),u(Tt.$$.fragment),ee=i(),_t=y("p"),_t.innerHTML=ke,se=i(),u(Jt.$$.fragment),le=i(),Ut=y("p"),Ut.innerHTML=Ze,ae=i(),u(kt.$$.fragment),ne=i(),Zt=y("p"),Zt.innerHTML=Ce,pe=i(),u(Ct.$$.fragment),re=i(),Wt=y("p"),Wt.innerHTML=We,ie=i(),u(vt.$$.fragment),oe=i(),u(it.$$.fragment),me=i(),u(ot.$$.fragment),ce=i(),u(Gt.$$.fragment),fe=i(),xt=y("p"),xt.textContent=ve,ue=i(),Rt=y("p"),Rt.textContent=Ge,he=i(),u(Xt.$$.fragment),de=i(),Vt=y("p"),Vt.innerHTML=xe,$e=i(),u(Ht.$$.fragment),Me=i(),Yt=y("p"),Yt.innerHTML=Re,be=i(),u(mt.$$.fragment),ge=i(),u(It.$$.fragment),ye=i(),Bt=y("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),h(g.$$.fragment,t),Z=o(t),h(V.$$.fragment,t),v=o(t),h(C.$$.fragment,t),x=o(t),U=j(t,"P",{"data-svelte-h":!0}),T(U)!=="svelte-u67xp1"&&(U.textContent=N),R=o(t),J=j(t,"P",{"data-svelte-h":!0}),T(J)!=="svelte-14hiaa1"&&(J.textContent=X),r=o(t),_=j(t,"OL",{"data-svelte-h":!0}),T(_)!=="svelte-10cs0j"&&(_.innerHTML=Y),E=o(t),h(H.$$.fragment,t),F=o(t),I=j(t,"P",{"data-svelte-h":!0}),T(I)!=="svelte-1bc8bfk"&&(I.textContent=f),G=o(t),h(z.$$.fragment,t),B=o(t),Q=j(t,"P",{"data-svelte-h":!0}),T(Q)!=="svelte-1hhyu5y"&&(Q.textContent=st),ct=o(t),h(q.$$.fragment,t),S=o(t),h(L.$$.fragment,t),A=o(t),lt=j(t,"P",{"data-svelte-h":!0}),T(lt)!=="svelte-71u4tm"&&(lt.textContent=ft),P=o(t),h(D.$$.fragment,t),K=o(t),at=j(t,"P",{"data-svelte-h":!0}),T(at)!=="svelte-18cnd8l"&&(at.textContent=ut),O=o(t),h(tt.$$.fragment,t),et=o(t),nt=j(t,"P",{"data-svelte-h":!0}),T(nt)!=="svelte-nfqprk"&&(nt.textContent=ht),p=o(t),w=j(t,"UL",{"data-svelte-h":!0}),T(w)!=="svelte-z448yg"&&(w.innerHTML=zt),Qt=o(t),h(dt.$$.fragment,t),qt=o(t),$t=j(t,"P",{"data-svelte-h":!0}),T($t)!=="svelte-1t0711w"&&($t.innerHTML=Te),St=o(t),h(Mt.$$.fragment,t),Lt=o(t),bt=j(t,"P",{"data-svelte-h":!0}),T(bt)!=="svelte-1lyhad1"&&(bt.innerHTML=_e),At=o(t),h(gt.$$.fragment,t),Pt=o(t),yt=j(t,"P",{"data-svelte-h":!0}),T(yt)!=="svelte-y65sjr"&&(yt.innerHTML=Je),Dt=o(t),h(jt.$$.fragment,t),Kt=o(t),wt=j(t,"P",{"data-svelte-h":!0}),T(wt)!=="svelte-59zcxv"&&(wt.innerHTML=Ue),Ot=o(t),h(rt.$$.fragment,t),te=o(t),h(Tt.$$.fragment,t),ee=o(t),_t=j(t,"P",{"data-svelte-h":!0}),T(_t)!=="svelte-16fyv40"&&(_t.innerHTML=ke),se=o(t),h(Jt.$$.fragment,t),le=o(t),Ut=j(t,"P",{"data-svelte-h":!0}),T(Ut)!=="svelte-1wr52zz"&&(Ut.innerHTML=Ze),ae=o(t),h(kt.$$.fragment,t),ne=o(t),Zt=j(t,"P",{"data-svelte-h":!0}),T(Zt)!=="svelte-11m7xom"&&(Zt.innerHTML=Ce),pe=o(t),h(Ct.$$.fragment,t),re=o(t),Wt=j(t,"P",{"data-svelte-h":!0}),T(Wt)!=="svelte-84b3vk"&&(Wt.innerHTML=We),ie=o(t),h(vt.$$.fragment,t),oe=o(t),h(it.$$.fragment,t),me=o(t),h(ot.$$.fragment,t),ce=o(t),h(Gt.$$.fragment,t),fe=o(t),xt=j(t,"P",{"data-svelte-h":!0}),T(xt)!=="svelte-1r6hgyn"&&(xt.textContent=ve),ue=o(t),Rt=j(t,"P",{"data-svelte-h":!0}),T(Rt)!=="svelte-ej1eir"&&(Rt.textContent=Ge),he=o(t),h(Xt.$$.fragment,t),de=o(t),Vt=j(t,"P",{"data-svelte-h":!0}),T(Vt)!=="svelte-hpekrl"&&(Vt.innerHTML=xe),$e=o(t),h(Ht.$$.fragment,t),Me=o(t),Yt=j(t,"P",{"data-svelte-h":!0}),T(Yt)!=="svelte-1kfpoxm"&&(Yt.innerHTML=Re),be=o(t),h(mt.$$.fragment,t),ge=o(t),h(It.$$.fragment,t),ye=o(t),Bt=j(t,"P",{}),Ne(Bt).forEach(l),this.h()},h(){Fe(e,"name","hf:doc:metadata"),Fe(e,"content",Ms)},m(t,n){Se(document.head,e),a(t,m,n),a(t,s,n),a(t,c,n),d(g,t,n),a(t,Z,n),d(V,t,n),a(t,v,n),d(C,t,n),a(t,x,n),a(t,U,n),a(t,R,n),a(t,J,n),a(t,r,n),a(t,_,n),a(t,E,n),d(H,t,n),a(t,F,n),a(t,I,n),a(t,G,n),d(z,t,n),a(t,B,n),a(t,Q,n),a(t,ct,n),d(q,t,n),a(t,S,n),d(L,t,n),a(t,A,n),a(t,lt,n),a(t,P,n),d(D,t,n),a(t,K,n),a(t,at,n),a(t,O,n),d(tt,t,n),a(t,et,n),a(t,nt,n),a(t,p,n),a(t,w,n),a(t,Qt,n),d(dt,t,n),a(t,qt,n),a(t,$t,n),a(t,St,n),d(Mt,t,n),a(t,Lt,n),a(t,bt,n),a(t,At,n),d(gt,t,n),a(t,Pt,n),a(t,yt,n),a(t,Dt,n),d(jt,t,n),a(t,Kt,n),a(t,wt,n),a(t,Ot,n),d(rt,t,n),a(t,te,n),d(Tt,t,n),a(t,ee,n),a(t,_t,n),a(t,se,n),d(Jt,t,n),a(t,le,n),a(t,Ut,n),a(t,ae,n),d(kt,t,n),a(t,ne,n),a(t,Zt,n),a(t,pe,n),d(Ct,t,n),a(t,re,n),a(t,Wt,n),a(t,ie,n),d(vt,t,n),a(t,oe,n),d(it,t,n),a(t,me,n),d(ot,t,n),a(t,ce,n),d(Gt,t,n),a(t,fe,n),a(t,xt,n),a(t,ue,n),a(t,Rt,n),a(t,he,n),d(Xt,t,n),a(t,de,n),a(t,Vt,n),a(t,$e,n),d(Ht,t,n),a(t,Me,n),a(t,Yt,n),a(t,be,n),d(mt,t,n),a(t,ge,n),d(It,t,n),a(t,ye,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}),rt.$set(Ve);const He={};n&2&&(He.$$scope={dirty:n,ctx:t}),it.$set(He);const Ye={};n&2&&(Ye.$$scope={dirty:n,ctx:t}),ot.$set(Ye);const Ie={};n&2&&(Ie.$$scope={dirty:n,ctx:t}),mt.$set(Ie)},i(t){je||($(g.$$.fragment,t),$(V.$$.fragment,t),$(C.$$.fragment,t),$(H.$$.fragment,t),$(z.$$.fragment,t),$(q.$$.fragment,t),$(L.$$.fragment,t),$(D.$$.fragment,t),$(tt.$$.fragment,t),$(dt.$$.fragment,t),$(Mt.$$.fragment,t),$(gt.$$.fragment,t),$(jt.$$.fragment,t),$(rt.$$.fragment,t),$(Tt.$$.fragment,t),$(Jt.$$.fragment,t),$(kt.$$.fragment,t),$(Ct.$$.fragment,t),$(vt.$$.fragment,t),$(it.$$.fragment,t),$(ot.$$.fragment,t),$(Gt.$$.fragment,t),$(Xt.$$.fragment,t),$(Ht.$$.fragment,t),$(mt.$$.fragment,t),$(It.$$.fragment,t),je=!0)},o(t){M(g.$$.fragment,t),M(V.$$.fragment,t),M(C.$$.fragment,t),M(H.$$.fragment,t),M(z.$$.fragment,t),M(q.$$.fragment,t),M(L.$$.fragment,t),M(D.$$.fragment,t),M(tt.$$.fragment,t),M(dt.$$.fragment,t),M(Mt.$$.fragment,t),M(gt.$$.fragment,t),M(jt.$$.fragment,t),M(rt.$$.fragment,t),M(Tt.$$.fragment,t),M(Jt.$$.fragment,t),M(kt.$$.fragment,t),M(Ct.$$.fragment,t),M(vt.$$.fragment,t),M(it.$$.fragment,t),M(ot.$$.fragment,t),M(Gt.$$.fragment,t),M(Xt.$$.fragment,t),M(Ht.$$.fragment,t),M(mt.$$.fragment,t),M(It.$$.fragment,t),je=!1},d(t){t&&(l(m),l(s),l(c),l(Z),l(v),l(x),l(U),l(R),l(J),l(r),l(_),l(E),l(F),l(I),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($t),l(St),l(Lt),l(bt),l(At),l(Pt),l(yt),l(Dt),l(Kt),l(wt),l(Ot),l(te),l(ee),l(_t),l(se),l(le),l(Ut),l(ae),l(ne),l(Zt),l(pe),l(re),l(Wt),l(ie),l(oe),l(me),l(ce),l(fe),l(xt),l(ue),l(Rt),l(he),l(de),l(Vt),l($e),l(Me),l(Yt),l(be),l(ge),l(ye),l(Bt)),l(e),b(g,t),b(V,t),b(C,t),b(H,t),b(z,t),b(q,t),b(L,t),b(D,t),b(tt,t),b(dt,t),b(Mt,t),b(gt,t),b(jt,t),b(rt,t),b(Tt,t),b(Jt,t),b(kt,t),b(Ct,t),b(vt,t),b(it,t),b(ot,t),b(Gt,t),b(Xt,t),b(Ht,t),b(mt,t),b(It,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 bs(k){return Be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ks extends Ee{constructor(e){super(),Qe(this,e,bs,$s,ze,{})}}export{ks as component};
