import{S as v0,i as y0,s as d0,e as c,k as m,w as o,t as h,M as k0,c as e,d as a,m as u,x as g,a as p,h as l,b as i,G as s,g as r,y as j,q as f,o as v,B as y,v as $0}from"../../chunks/vendor-hf-doc-builder.js";import{T as El}from"../../chunks/Tip-hf-doc-builder.js";import{Y as _0}from"../../chunks/Youtube-hf-doc-builder.js";import{I as X}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as w}from"../../chunks/CodeBlock-hf-doc-builder.js";import{D as E0}from"../../chunks/DocNotebookDropdown-hf-doc-builder.js";import{F as w0}from"../../chunks/FrameworkSwitchCourse-hf-doc-builder.js";function q0(S){let b,E,d,_,P,T,N,D,en,pn,ls,J,H,_n,A,K,W,rn,ts,mn,En,Y,wn;return{c(){b=c("p"),E=h("\u270F\uFE0F "),d=c("strong"),_=h("\u0110\u1EBFn l\u01B0\u1EE3t b\u1EA1n!"),P=h(" L\xE0 m\u1ED9t th\u1EED th\xE1ch kh\xF4ng b\u1EAFt bu\u1ED9c sau khi ch\xFAng ta \u0111\xE3 gi\u1EA3i quy\u1EBFt xong c\xE1c v\u1EA5n \u0111\u1EC1 kh\xE1c, b\u1EA1n c\xF3 th\u1EC3 th\u1EED quay l\u1EA1i b\u01B0\u1EDBc n\xE0y v\xE0 l\xE0m cho m\xF4 h\xECnh ho\u1EA1t \u0111\u1ED9ng v\u1EDBi m\u1EA5t m\xE1t do Keras t\xEDnh to\xE1n ban \u0111\u1EA7u thay v\xEC m\u1EA5t m\xE1t n\u1ED9i b\u1ED9. B\u1EA1n s\u1EBD c\u1EA7n ph\u1EA3i th\xEAm "),T=c("code"),N=h('"labels"'),D=h(" v\xE0o "),en=c("code"),pn=h("label_cols"),ls=h(" c\u1EE7a "),J=c("code"),H=h("to_tf_dataset()"),_n=h(" \u0111\u1EC3 \u0111\u1EA3m b\u1EA3o r\u1EB1ng c\xE1c nh\xE3n \u0111\u01B0\u1EE3c xu\u1EA5t ch\xEDnh x\xE1c, \u0111i\u1EC1u n\xE0y s\u1EBD gi\xFAp b\u1EA1n c\xF3 \u0111\u01B0\u1EE3c \u0111\u1ED9 d\u1ED1c - nh\u01B0ng c\xF3 m\u1ED9t v\u1EA5n \u0111\u1EC1 n\u1EEFa v\u1EDBi s\u1EF1 m\u1EA5t m\xE1t m\xE0 ch\xFAng ta \u0111\xE3 ch\u1EC9 \u0111\u1ECBnh. Vi\u1EC7c hu\u1EA5nl uy\u1EC7n v\u1EABn s\u1EBD di\u1EC5n ra v\u1EDBi v\u1EA5n \u0111\u1EC1 n\xE0y, nh\u01B0ng vi\u1EC7c h\u1ECDc s\u1EBD r\u1EA5t ch\u1EADm v\xE0 s\u1EBD kh\u1EA3 n\u0103ng m\u1EA5t m\xE1t hu\u1EA5n luy\u1EC7n cao. B\u1EA1n c\xF3 th\u1EC3 t\xECm ra n\xF3 l\xE0 g\xEC kh\xF4ng?"),A=m(),K=c("p"),W=h("M\u1ED9t g\u1EE3i \xFD m\xE3 ho\xE1 ROT13, n\u1EBFu b\u1EA1n b\u1EBF t\u1EAFc: Vs lbh ybbx ng gur bhgchgf bs FrdhraprPynffvsvpngvba zbqryf va Genafsbezref, gurve svefg bhgchg vf "),rn=c("code"),ts=h("ybtvgf"),mn=h(". Jung ner ybtvgf?"),En=m(),Y=c("p"),wn=h("V\xE0 m\u1ED9t g\u1EE3i \xFD th\u1EE9 hai: Jura lbh fcrpvsl bcgvzvmref, npgvingvbaf be ybffrf jvgu fgevatf, Xrenf frgf nyy gur nethzrag inyhrf gb gurve qrsnhygf. Jung nethzragf qbrf FcnefrPngrtbevpnyPebffragebcl unir, naq jung ner gurve qrsnhygf?")},l(q){b=e(q,"P",{});var C=p(b);E=l(C,"\u270F\uFE0F "),d=e(C,"STRONG",{});var G=p(d);_=l(G,"\u0110\u1EBFn l\u01B0\u1EE3t b\u1EA1n!"),G.forEach(a),P=l(C," L\xE0 m\u1ED9t th\u1EED th\xE1ch kh\xF4ng b\u1EAFt bu\u1ED9c sau khi ch\xFAng ta \u0111\xE3 gi\u1EA3i quy\u1EBFt xong c\xE1c v\u1EA5n \u0111\u1EC1 kh\xE1c, b\u1EA1n c\xF3 th\u1EC3 th\u1EED quay l\u1EA1i b\u01B0\u1EDBc n\xE0y v\xE0 l\xE0m cho m\xF4 h\xECnh ho\u1EA1t \u0111\u1ED9ng v\u1EDBi m\u1EA5t m\xE1t do Keras t\xEDnh to\xE1n ban \u0111\u1EA7u thay v\xEC m\u1EA5t m\xE1t n\u1ED9i b\u1ED9. B\u1EA1n s\u1EBD c\u1EA7n ph\u1EA3i th\xEAm "),T=e(C,"CODE",{});var sa=p(T);N=l(sa,'"labels"'),sa.forEach(a),D=l(C," v\xE0o "),en=e(C,"CODE",{});var qn=p(en);pn=l(qn,"label_cols"),qn.forEach(a),ls=l(C," c\u1EE7a "),J=e(C,"CODE",{});var aa=p(J);H=l(aa,"to_tf_dataset()"),aa.forEach(a),_n=l(C," \u0111\u1EC3 \u0111\u1EA3m b\u1EA3o r\u1EB1ng c\xE1c nh\xE3n \u0111\u01B0\u1EE3c xu\u1EA5t ch\xEDnh x\xE1c, \u0111i\u1EC1u n\xE0y s\u1EBD gi\xFAp b\u1EA1n c\xF3 \u0111\u01B0\u1EE3c \u0111\u1ED9 d\u1ED1c - nh\u01B0ng c\xF3 m\u1ED9t v\u1EA5n \u0111\u1EC1 n\u1EEFa v\u1EDBi s\u1EF1 m\u1EA5t m\xE1t m\xE0 ch\xFAng ta \u0111\xE3 ch\u1EC9 \u0111\u1ECBnh. Vi\u1EC7c hu\u1EA5nl uy\u1EC7n v\u1EABn s\u1EBD di\u1EC5n ra v\u1EDBi v\u1EA5n \u0111\u1EC1 n\xE0y, nh\u01B0ng vi\u1EC7c h\u1ECDc s\u1EBD r\u1EA5t ch\u1EADm v\xE0 s\u1EBD kh\u1EA3 n\u0103ng m\u1EA5t m\xE1t hu\u1EA5n luy\u1EC7n cao. B\u1EA1n c\xF3 th\u1EC3 t\xECm ra n\xF3 l\xE0 g\xEC kh\xF4ng?"),C.forEach(a),A=u(q),K=e(q,"P",{});var Cn=p(K);W=l(Cn,"M\u1ED9t g\u1EE3i \xFD m\xE3 ho\xE1 ROT13, n\u1EBFu b\u1EA1n b\u1EBF t\u1EAFc: Vs lbh ybbx ng gur bhgchgf bs FrdhraprPynffvsvpngvba zbqryf va Genafsbezref, gurve svefg bhgchg vf "),rn=e(Cn,"CODE",{});var cs=p(rn);ts=l(cs,"ybtvgf"),cs.forEach(a),mn=l(Cn,". Jung ner ybtvgf?"),Cn.forEach(a),En=u(q),Y=e(q,"P",{});var L=p(Y);wn=l(L,"V\xE0 m\u1ED9t g\u1EE3i \xFD th\u1EE9 hai: Jura lbh fcrpvsl bcgvzvmref, npgvingvbaf be ybffrf jvgu fgevatf, Xrenf frgf nyy gur nethzrag inyhrf gb gurve qrsnhygf. Jung nethzragf qbrf FcnefrPngrtbevpnyPebffragebcl unir, naq jung ner gurve qrsnhygf?"),L.forEach(a)},m(q,C){r(q,b,C),s(b,E),s(b,d),s(d,_),s(b,P),s(b,T),s(T,N),s(b,D),s(b,en),s(en,pn),s(b,ls),s(b,J),s(J,H),s(b,_n),r(q,A,C),r(q,K,C),s(K,W),s(K,rn),s(rn,ts),s(K,mn),r(q,En,C),r(q,Y,C),s(Y,wn)},d(q){q&&a(b),q&&a(A),q&&a(K),q&&a(En),q&&a(Y)}}}function C0(S){let b,E,d,_,P;return{c(){b=c("p"),E=h("\u{1F4A1} B\u1EA1n c\u0169ng c\xF3 th\u1EC3 nh\u1EADp h\xE0m "),d=c("code"),_=h("create_optimizer()"),P=h(" t\u1EEB \u{1F917} Transformers, h\xE0m n\xE0y s\u1EBD cho b\u1EA1n m\u1ED9t tr\xECnh t\u1ED1i \u01B0u AdamW v\u1EDBi v\u1EDBi \u0111\u1ED9 ph\xE2n r\xE3 tr\u1ECDng s\u1ED1 ch\xEDnh x\xE1c c\u0169ng nh\u01B0 kh\u1EDFi \u0111\u1ED9ng v\xE0 ph\xE2n r\xE3 t\u1ED1c \u0111\u1ED9 h\u1ECDc. Tr\xECnh n\xE0y th\u01B0\u1EDDng s\u1EBD t\u1EA1o ra k\u1EBFt qu\u1EA3 t\u1ED1t h\u01A1n m\u1ED9t ch\xFAt so v\u1EDBi k\u1EBFt qu\u1EA3 b\u1EA1n nh\u1EADn \u0111\u01B0\u1EE3c v\u1EDBi tr\xECnh t\u1ED1i \u01B0u h\xF3a Adam m\u1EB7c \u0111\u1ECBnh.")},l(T){b=e(T,"P",{});var N=p(b);E=l(N,"\u{1F4A1} B\u1EA1n c\u0169ng c\xF3 th\u1EC3 nh\u1EADp h\xE0m "),d=e(N,"CODE",{});var D=p(d);_=l(D,"create_optimizer()"),D.forEach(a),P=l(N," t\u1EEB \u{1F917} Transformers, h\xE0m n\xE0y s\u1EBD cho b\u1EA1n m\u1ED9t tr\xECnh t\u1ED1i \u01B0u AdamW v\u1EDBi v\u1EDBi \u0111\u1ED9 ph\xE2n r\xE3 tr\u1ECDng s\u1ED1 ch\xEDnh x\xE1c c\u0169ng nh\u01B0 kh\u1EDFi \u0111\u1ED9ng v\xE0 ph\xE2n r\xE3 t\u1ED1c \u0111\u1ED9 h\u1ECDc. Tr\xECnh n\xE0y th\u01B0\u1EDDng s\u1EBD t\u1EA1o ra k\u1EBFt qu\u1EA3 t\u1ED1t h\u01A1n m\u1ED9t ch\xFAt so v\u1EDBi k\u1EBFt qu\u1EA3 b\u1EA1n nh\u1EADn \u0111\u01B0\u1EE3c v\u1EDBi tr\xECnh t\u1ED1i \u01B0u h\xF3a Adam m\u1EB7c \u0111\u1ECBnh."),N.forEach(a)},m(T,N){r(T,b,N),s(b,E),s(b,d),s(d,_),s(b,P)},d(T){T&&a(b)}}}function T0(S){let b,E;return{c(){b=c("p"),E=h("Trong ph\u1EA7n ti\u1EBFp theo c\u1EE7a kh\xF3a h\u1ECDc, ch\xFAng ta s\u1EBD xem x\xE9t c\xE1c k\u1EF9 thu\u1EADt n\xE2ng cao h\u01A1n c\xF3 th\u1EC3 gi\xFAp b\u1EA1n gi\u1EA3m dung l\u01B0\u1EE3ng b\u1ED9 nh\u1EDB v\xE0 cho ph\xE9p b\u1EA1n tinh ch\u1EC9nh c\xE1c m\xF4 h\xECnh l\u1EDBn nh\u1EA5t.")},l(d){b=e(d,"P",{});var _=p(b);E=l(_,"Trong ph\u1EA7n ti\u1EBFp theo c\u1EE7a kh\xF3a h\u1ECDc, ch\xFAng ta s\u1EBD xem x\xE9t c\xE1c k\u1EF9 thu\u1EADt n\xE2ng cao h\u01A1n c\xF3 th\u1EC3 gi\xFAp b\u1EA1n gi\u1EA3m dung l\u01B0\u1EE3ng b\u1ED9 nh\u1EDB v\xE0 cho ph\xE9p b\u1EA1n tinh ch\u1EC9nh c\xE1c m\xF4 h\xECnh l\u1EDBn nh\u1EA5t."),_.forEach(a)},m(d,_){r(d,b,_),s(b,E)},d(d){d&&a(b)}}}function x0(S){let b,E;return{c(){b=c("p"),E=h("\u{1F4A1} N\u1EBFu d\u1EEF li\u1EC7u hu\u1EA5n luy\u1EC7n c\u1EE7a b\u1EA1n kh\xF4ng c\xE2n b\u1EB1ng, h\xE3y \u0111\u1EA3m b\u1EA3o t\u1EA1o m\u1ED9t lo\u1EA1t d\u1EEF li\u1EC7u hu\u1EA5n luy\u1EC7n c\xF3 ch\u1EE9a t\u1EA5t c\u1EA3 c\xE1c nh\xE3n.")},l(d){b=e(d,"P",{});var _=p(b);E=l(_,"\u{1F4A1} N\u1EBFu d\u1EEF li\u1EC7u hu\u1EA5n luy\u1EC7n c\u1EE7a b\u1EA1n kh\xF4ng c\xE2n b\u1EB1ng, h\xE3y \u0111\u1EA3m b\u1EA3o t\u1EA1o m\u1ED9t lo\u1EA1t d\u1EEF li\u1EC7u hu\u1EA5n luy\u1EC7n c\xF3 ch\u1EE9a t\u1EA5t c\u1EA3 c\xE1c nh\xE3n."),_.forEach(a)},m(d,_){r(d,b,_),s(b,E)},d(d){d&&a(b)}}}function P0(S){let b,E;return{c(){b=c("p"),E=h("\u26A0\uFE0F B\u1EA1n s\u1EBD ph\u1EA3i t\u1EA1o l\u1EA1i m\xF4 h\xECnh c\u1EE7a m\xECnh v\xE0 bi\xEAn d\u1ECBch l\u1EA1i sau b\xE0i ki\u1EC3m tra overfitt n\xE0y, v\xEC m\xF4 h\xECnh thu \u0111\u01B0\u1EE3c c\xF3 th\u1EC3 s\u1EBD kh\xF4ng th\u1EC3 kh\xF4i ph\u1EE5c v\xE0 h\u1ECDc \u0111\u01B0\u1EE3c \u0111i\u1EC1u g\xEC \u0111\xF3 h\u1EEFu \xEDch tr\xEAn t\u1EADp d\u1EEF li\u1EC7u \u0111\u1EA7y \u0111\u1EE7 c\u1EE7a b\u1EA1n.")},l(d){b=e(d,"P",{});var _=p(b);E=l(_,"\u26A0\uFE0F B\u1EA1n s\u1EBD ph\u1EA3i t\u1EA1o l\u1EA1i m\xF4 h\xECnh c\u1EE7a m\xECnh v\xE0 bi\xEAn d\u1ECBch l\u1EA1i sau b\xE0i ki\u1EC3m tra overfitt n\xE0y, v\xEC m\xF4 h\xECnh thu \u0111\u01B0\u1EE3c c\xF3 th\u1EC3 s\u1EBD kh\xF4ng th\u1EC3 kh\xF4i ph\u1EE5c v\xE0 h\u1ECDc \u0111\u01B0\u1EE3c \u0111i\u1EC1u g\xEC \u0111\xF3 h\u1EEFu \xEDch tr\xEAn t\u1EADp d\u1EEF li\u1EC7u \u0111\u1EA7y \u0111\u1EE7 c\u1EE7a b\u1EA1n."),_.forEach(a)},m(d,_){r(d,b,_),s(b,E)},d(d){d&&a(b)}}}function N0(S){let b,E,d,_,P,T,N,D,en,pn,ls,J,H,_n,A,K,W,rn,ts,mn,En,Y,wn,q,C,G,sa,qn,aa,Cn,cs,L,Bc,za,Sc,Kc,wl,Tn,zc,es,Mc,Vc,ql,ps,Cl,xn,Fc,Ma,Hc,Gc,Tl,ha,Lc,xl,rs,Pl,la,Uc,Nl,un,Pn,Va,ms,Rc,Fa,Ic,Al,ta,Xc,Dl,x,Jc,Ha,Wc,Yc,Ga,Zc,Qc,La,ne,se,Ua,ae,he,Ra,le,te,Ia,ce,ee,Ol,us,Bl,U,Xa,pe,re,Ja,me,ue,Wa,ie,be,Sl,is,Kl,z,oe,Ya,ge,je,Za,fe,ve,Qa,ye,de,zl,Nn,ke,nh,$e,_e,Ml,Z,Ee,sh,we,qe,ah,Ce,Te,Vl,bs,Fl,ca,xe,Hl,An,Gl,Dn,Pe,hh,Ne,Ae,Ll,os,Ul,ea,De,Rl,gs,lh,Oe,Be,Il,bn,On,th,js,Se,ch,Ke,Xl,R,eh,ze,Me,ph,Ve,Fe,rh,He,Ge,Jl,Q,Le,mh,Ue,Re,uh,Ie,Xe,Wl,fs,Yl,vs,Zl,k,Je,ih,We,Ye,bh,Ze,Qe,oh,np,sp,gh,ap,hp,jh,lp,tp,fh,cp,ep,vh,pp,rp,yh,mp,up,dh,ip,bp,kh,op,gp,$h,jp,fp,_h,vp,yp,Eh,dp,kp,wh,$p,_p,qh,Ep,wp,Ql,M,qp,Ch,Cp,Tp,Th,xp,Pp,xh,Np,Ap,nt,ys,st,pa,Dp,at,ds,ht,I,Ph,Op,Bp,Nh,Sp,Kp,Ah,zp,Mp,lt,ks,tt,$s,ct,ra,Vp,et,_s,pt,Es,rt,ma,Fp,mt,ws,ut,qs,it,nn,Hp,Dh,Gp,Lp,Oh,Up,Rp,bt,Cs,ot,Ts,gt,Bn,Ip,Bh,Xp,Jp,jt,xs,ft,Ps,vt,Sn,Wp,Sh,Yp,Zp,yt,on,Kn,Kh,Ns,Qp,zh,nr,dt,sn,sr,Mh,ar,hr,Vh,lr,tr,kt,zn,cr,As,er,pr,$t,an,rr,Fh,mr,ur,Hh,ir,br,_t,Ds,Et,Mn,wt,ua,or,qt,Os,Ct,Bs,Tt,ia,gr,xt,gn,Vn,Gh,Ss,jr,Lh,fr,Pt,ba,vr,Nt,jn,Fn,Uh,Ks,yr,Rh,dr,At,hn,kr,Ih,$r,_r,Xh,Er,wr,Dt,Hn,Ot,fn,Gn,Jh,zs,qr,Wh,Cr,Bt,ln,Tr,Yh,xr,Pr,Zh,Nr,Ar,St,oa,Dr,Kt,Ln,Or,Qh,Br,Sr,zt,vn,Un,nl,Ms,Kr,sl,zr,Mt,O,Mr,al,Vr,Fr,hl,Hr,Gr,ll,Lr,Ur,tl,Rr,Ir,Vt,Vs,Ft,ga,Xr,Ht,Fs,Gt,ja,Jr,Lt,V,cl,Wr,Yr,el,Zr,Qr,pl,nm,sm,rl,am,Ut,fa,hm,Rt,va,lm,It,ya,tm,Xt,yn,Rn,ml,Hs,cm,ul,em,Jt,da,pm,Wt,tn,rm,il,mm,um,bl,im,bm,Yt,Gs,Zt,In,Qt,Xn,om,ol,gm,jm,nc,ka,fm,sc,Jn,ac,dn,Wn,gl,Ls,vm,jl,ym,hc,Yn,dm,fl,km,$m,lc,$a,_m,tc,_a,Em,cc,kn,Zn,vl,Us,wm,yl,qm,ec,Qn,Cm,Rs,Tm,xm,pc,Ea,Pm,rc,F,wa,Is,Nm,Am,Dm,qa,Xs,Om,Bm,Sm,Ca,Js,Km,zm,Mm,Ta,Ws,Vm,Fm,mc,xa,Hm,uc;return d=new w0({props:{fw:S[0]}}),D=new X({}),H=new E0({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/vi/chapter8/section4_tf.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/vi/chapter8/section4_tf.ipynb"}]}}),q=new _0({props:{id:"N9kO52itd0Q"}}),ps=new w({props:{code:`from datasets import load_dataset
import evaluate
from transformers import (
    AutoTokenizer,
    TFAutoModelForSequenceClassification,
)

raw_datasets = load_dataset("glue", "mnli")

model_checkpoint = "distilbert-base-uncased"
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)


def preprocess_function(examples):
    return tokenizer(examples["premise"], examples["hypothesis"], truncation=True)


tokenized_datasets = raw_datasets.map(preprocess_function, batched=True)

train_dataset = tokenized_datasets["train"].to_tf_dataset(
    columns=["input_ids", "labels"], batch_size=16, shuffle=True
)

validation_dataset = tokenized_datasets["validation_matched"].to_tf_dataset(
    columns=["input_ids", "labels"], batch_size=16, shuffle=True
)

model = TFAutoModelForSequenceClassification.from_pretrained(model_checkpoint)

model.compile(loss="sparse_categorical_crossentropy", optimizer="adam")

model.fit(train_dataset)`,highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-keyword">import</span> evaluate
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> (
    AutoTokenizer,
    TFAutoModelForSequenceClassification,
)

raw_datasets = load_dataset(<span class="hljs-string">&quot;glue&quot;</span>, <span class="hljs-string">&quot;mnli&quot;</span>)

model_checkpoint = <span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)


<span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_function</span>(<span class="hljs-params">examples</span>):
    <span class="hljs-keyword">return</span> tokenizer(examples[<span class="hljs-string">&quot;premise&quot;</span>], examples[<span class="hljs-string">&quot;hypothesis&quot;</span>], truncation=<span class="hljs-literal">True</span>)


tokenized_datasets = raw_datasets.<span class="hljs-built_in">map</span>(preprocess_function, batched=<span class="hljs-literal">True</span>)

train_dataset = tokenized_datasets[<span class="hljs-string">&quot;train&quot;</span>].to_tf_dataset(
    columns=[<span class="hljs-string">&quot;input_ids&quot;</span>, <span class="hljs-string">&quot;labels&quot;</span>], batch_size=<span class="hljs-number">16</span>, shuffle=<span class="hljs-literal">True</span>
)

validation_dataset = tokenized_datasets[<span class="hljs-string">&quot;validation_matched&quot;</span>].to_tf_dataset(
    columns=[<span class="hljs-string">&quot;input_ids&quot;</span>, <span class="hljs-string">&quot;labels&quot;</span>], batch_size=<span class="hljs-number">16</span>, shuffle=<span class="hljs-literal">True</span>
)

model = TFAutoModelForSequenceClassification.from_pretrained(model_checkpoint)

model.<span class="hljs-built_in">compile</span>(loss=<span class="hljs-string">&quot;sparse_categorical_crossentropy&quot;</span>, optimizer=<span class="hljs-string">&quot;adam&quot;</span>)

model.fit(train_dataset)`}}),rs=new w({props:{code:"ValueError: No gradients provided for any variable: ['tf_distil_bert_for_sequence_classification/distilbert/embeddings/word_embeddings/weight:0', '...']",highlighted:'ValueError: No gradients provided <span class="hljs-keyword">for</span> <span class="hljs-built_in">any</span> variable: [<span class="hljs-string">&#x27;tf_distil_bert_for_sequence_classification/distilbert/embeddings/word_embeddings/weight:0&#x27;</span>, <span class="hljs-string">&#x27;...&#x27;</span>]'}}),ms=new X({}),us=new w({props:{code:`for batch in train_dataset:
    break`,highlighted:`<span class="hljs-keyword">for</span> batch <span class="hljs-keyword">in</span> train_dataset:
    <span class="hljs-keyword">break</span>`}}),is=new w({props:{code:`{'attention_mask': <tf.Tensor: shape=(16, 76), dtype=int64, numpy=
 array([[1, 1, 1, ..., 0, 0, 0],
        [1, 1, 1, ..., 0, 0, 0],
        [1, 1, 1, ..., 0, 0, 0],
        ...,
        [1, 1, 1, ..., 1, 1, 1],
        [1, 1, 1, ..., 0, 0, 0],
        [1, 1, 1, ..., 0, 0, 0]])>,
 'label': <tf.Tensor: shape=(16,), dtype=int64, numpy=array([0, 2, 1, 2, 1, 1, 2, 0, 0, 0, 1, 0, 1, 2, 2, 1])>,
 'input_ids': <tf.Tensor: shape=(16, 76), dtype=int64, numpy=
 array([[ 101, 2174, 1010, ...,    0,    0,    0],
        [ 101, 3174, 2420, ...,    0,    0,    0],
        [ 101, 2044, 2048, ...,    0,    0,    0],
        ...,
        [ 101, 3398, 3398, ..., 2051, 2894,  102],
        [ 101, 1996, 4124, ...,    0,    0,    0],
        [ 101, 1999, 2070, ...,    0,    0,    0]])>}`,highlighted:`{<span class="hljs-string">&#x27;attention_mask&#x27;</span>: &lt;tf.Tensor: shape=(<span class="hljs-number">16</span>, <span class="hljs-number">76</span>), dtype=int64, numpy=
 array([[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, ..., <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
        [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, ..., <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
        [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, ..., <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
        ...,
        [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, ..., <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
        [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, ..., <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>],
        [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, ..., <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]])&gt;,
 <span class="hljs-string">&#x27;label&#x27;</span>: &lt;tf.Tensor: shape=(<span class="hljs-number">16</span>,), dtype=int64, numpy=array([<span class="hljs-number">0</span>, <span class="hljs-number">2</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">2</span>, <span class="hljs-number">1</span>])&gt;,
 <span class="hljs-string">&#x27;input_ids&#x27;</span>: &lt;tf.Tensor: shape=(<span class="hljs-number">16</span>, <span class="hljs-number">76</span>), dtype=int64, numpy=
 array([[ <span class="hljs-number">101</span>, <span class="hljs-number">2174</span>, <span class="hljs-number">1010</span>, ...,    <span class="hljs-number">0</span>,    <span class="hljs-number">0</span>,    <span class="hljs-number">0</span>],
        [ <span class="hljs-number">101</span>, <span class="hljs-number">3174</span>, <span class="hljs-number">2420</span>, ...,    <span class="hljs-number">0</span>,    <span class="hljs-number">0</span>,    <span class="hljs-number">0</span>],
        [ <span class="hljs-number">101</span>, <span class="hljs-number">2044</span>, <span class="hljs-number">2048</span>, ...,    <span class="hljs-number">0</span>,    <span class="hljs-number">0</span>,    <span class="hljs-number">0</span>],
        ...,
        [ <span class="hljs-number">101</span>, <span class="hljs-number">3398</span>, <span class="hljs-number">3398</span>, ..., <span class="hljs-number">2051</span>, <span class="hljs-number">2894</span>,  <span class="hljs-number">102</span>],
        [ <span class="hljs-number">101</span>, <span class="hljs-number">1996</span>, <span class="hljs-number">4124</span>, ...,    <span class="hljs-number">0</span>,    <span class="hljs-number">0</span>,    <span class="hljs-number">0</span>],
        [ <span class="hljs-number">101</span>, <span class="hljs-number">1999</span>, <span class="hljs-number">2070</span>, ...,    <span class="hljs-number">0</span>,    <span class="hljs-number">0</span>,    <span class="hljs-number">0</span>]])&gt;}`}}),bs=new w({props:{code:'model.compile(optimizer="adam")',highlighted:'model.<span class="hljs-built_in">compile</span>(optimizer=<span class="hljs-string">&quot;adam&quot;</span>)'}}),An=new El({props:{$$slots:{default:[q0]},$$scope:{ctx:S}}}),os=new w({props:{code:"  246/24543 [..............................] - ETA: 15:52 - loss: nan",highlighted:'  <span class="hljs-number">246</span>/<span class="hljs-number">24543</span> [..............................] - ETA: <span class="hljs-number">15</span>:<span class="hljs-number">52</span> - loss: nan'}}),js=new X({}),fs=new w({props:{code:"model(batch)",highlighted:"model(batch)"}}),vs=new w({props:{code:`TFSequenceClassifierOutput(loss=<tf.Tensor: shape=(16,), dtype=float32, numpy=
array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
       nan, nan, nan], dtype=float32)>, logits=<tf.Tensor: shape=(16, 2), dtype=float32, numpy=
array([[nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan]], dtype=float32)>, hidden_states=None, attentions=None)`,highlighted:`TFSequenceClassifierOutput(loss=&lt;tf.Tensor: shape=(<span class="hljs-number">16</span>,), dtype=float32, numpy=
array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
       nan, nan, nan], dtype=float32)&gt;, logits=&lt;tf.Tensor: shape=(<span class="hljs-number">16</span>, <span class="hljs-number">2</span>), dtype=float32, numpy=
array([[nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan],
       [nan, nan]], dtype=float32)&gt;, hidden_states=<span class="hljs-literal">None</span>, attentions=<span class="hljs-literal">None</span>)`}}),ys=new w({props:{code:`model = TFAutoModelForSequenceClassification.from_pretrained(model_checkpoint)
model(batch)`,highlighted:`model = TFAutoModelForSequenceClassification.from_pretrained(model_checkpoint)
model(batch)`}}),ds=new w({props:{code:`TFSequenceClassifierOutput(loss=<tf.Tensor: shape=(16,), dtype=float32, numpy=
array([0.6844486 ,        nan,        nan, 0.67127866, 0.7068601 ,
              nan, 0.69309855,        nan, 0.65531296,        nan,
              nan,        nan, 0.675402  ,        nan,        nan,
       0.69831556], dtype=float32)>, logits=<tf.Tensor: shape=(16, 2), dtype=float32, numpy=
array([[-0.04761693, -0.06509043],
       [-0.0481936 , -0.04556257],
       [-0.0040929 , -0.05848458],
       [-0.02417453, -0.0684005 ],
       [-0.02517801, -0.05241832],
       [-0.04514256, -0.0757378 ],
       [-0.02656011, -0.02646275],
       [ 0.00766164, -0.04350497],
       [ 0.02060014, -0.05655622],
       [-0.02615328, -0.0447021 ],
       [-0.05119278, -0.06928903],
       [-0.02859691, -0.04879177],
       [-0.02210129, -0.05791225],
       [-0.02363213, -0.05962167],
       [-0.05352269, -0.0481673 ],
       [-0.08141848, -0.07110836]], dtype=float32)>, hidden_states=None, attentions=None)`,highlighted:`TFSequenceClassifierOutput(loss=&lt;tf.Tensor: shape=(<span class="hljs-number">16</span>,), dtype=float32, numpy=
array([<span class="hljs-number">0.6844486</span> ,        nan,        nan, <span class="hljs-number">0.67127866</span>, <span class="hljs-number">0.7068601</span> ,
              nan, <span class="hljs-number">0.69309855</span>,        nan, <span class="hljs-number">0.65531296</span>,        nan,
              nan,        nan, <span class="hljs-number">0.675402</span>  ,        nan,        nan,
       <span class="hljs-number">0.69831556</span>], dtype=float32)&gt;, logits=&lt;tf.Tensor: shape=(<span class="hljs-number">16</span>, <span class="hljs-number">2</span>), dtype=float32, numpy=
array([[-<span class="hljs-number">0.04761693</span>, -<span class="hljs-number">0.06509043</span>],
       [-<span class="hljs-number">0.0481936</span> , -<span class="hljs-number">0.04556257</span>],
       [-<span class="hljs-number">0.0040929</span> , -<span class="hljs-number">0.05848458</span>],
       [-<span class="hljs-number">0.02417453</span>, -<span class="hljs-number">0.0684005</span> ],
       [-<span class="hljs-number">0.02517801</span>, -<span class="hljs-number">0.05241832</span>],
       [-<span class="hljs-number">0.04514256</span>, -<span class="hljs-number">0.0757378</span> ],
       [-<span class="hljs-number">0.02656011</span>, -<span class="hljs-number">0.02646275</span>],
       [ <span class="hljs-number">0.00766164</span>, -<span class="hljs-number">0.04350497</span>],
       [ <span class="hljs-number">0.02060014</span>, -<span class="hljs-number">0.05655622</span>],
       [-<span class="hljs-number">0.02615328</span>, -<span class="hljs-number">0.0447021</span> ],
       [-<span class="hljs-number">0.05119278</span>, -<span class="hljs-number">0.06928903</span>],
       [-<span class="hljs-number">0.02859691</span>, -<span class="hljs-number">0.04879177</span>],
       [-<span class="hljs-number">0.02210129</span>, -<span class="hljs-number">0.05791225</span>],
       [-<span class="hljs-number">0.02363213</span>, -<span class="hljs-number">0.05962167</span>],
       [-<span class="hljs-number">0.05352269</span>, -<span class="hljs-number">0.0481673</span> ],
       [-<span class="hljs-number">0.08141848</span>, -<span class="hljs-number">0.07110836</span>]], dtype=float32)&gt;, hidden_states=<span class="hljs-literal">None</span>, attentions=<span class="hljs-literal">None</span>)`}}),ks=new w({props:{code:`import numpy as np

loss = model(batch).loss.numpy()
indices = np.flatnonzero(np.isnan(loss))
indices`,highlighted:`<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np

loss = model(batch).loss.numpy()
indices = np.flatnonzero(np.isnan(loss))
indices`}}),$s=new w({props:{code:"array([ 1,  2,  5,  7,  9, 10, 11, 13, 14])",highlighted:'array([ <span class="hljs-number">1</span>,  <span class="hljs-number">2</span>,  <span class="hljs-number">5</span>,  <span class="hljs-number">7</span>,  <span class="hljs-number">9</span>, <span class="hljs-number">10</span>, <span class="hljs-number">11</span>, <span class="hljs-number">13</span>, <span class="hljs-number">14</span>])'}}),_s=new w({props:{code:`input_ids = batch["input_ids"].numpy()
input_ids[indices]`,highlighted:`input_ids = batch[<span class="hljs-string">&quot;input_ids&quot;</span>].numpy()
input_ids[indices]`}}),Es=new w({props:{code:`array([[  101,  2007,  2032,  2001,  1037, 16480,  3917,  2594,  4135,
        23212,  3070,  2214, 10170,  1010,  2012,  4356,  1997,  3183,
         6838, 12953,  2039,  2000,  1996,  6147,  1997,  2010,  2606,
         1012,   102,  6838,  2001,  3294,  6625,  3773,  1996,  2214,
         2158,  1012,   102,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0],
       [  101,  1998,  6814,  2016,  2234,  2461,  2153,  1998, 13322,
         2009,  1012,   102,  2045,  1005,  1055,  2053,  3382,  2008,
         2016,  1005,  2222,  3046,  8103,  2075,  2009,  2153,  1012,
          102,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0],
       [  101,  1998,  2007,  1996,  3712,  4634,  1010,  2057,  8108,
         2025,  3404,  2028,  1012,  1996,  2616, 18449,  2125,  1999,
         1037,  9666,  1997,  4100,  8663, 11020,  6313,  2791,  1998,
         2431,  1011,  4301,  1012,   102,  2028,  1005,  1055,  5177,
         2110,  1998,  3977,  2000,  2832,  2106,  2025,  2689,  2104,
         2122,  6214,  1012,   102,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0],
       [  101,  1045,  2001,  1999,  1037, 13090,  5948,  2007,  2048,
         2308,  2006,  2026,  5001,  2043,  2026,  2171,  2001,  2170,
         1012,   102,  1045,  2001,  3564,  1999,  2277,  1012,   102,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0],
       [  101,  2195,  4279,  2191,  2039,  1996,  2181,  2124,  2004,
         1996,  2225,  7363,  1012,   102,  2045,  2003,  2069,  2028,
         2451,  1999,  1996,  2225,  7363,  1012,   102,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0],
       [  101,  2061,  2008,  1045,  2123,  1005,  1056,  2113,  2065,
         2009,  2428, 10654,  7347,  2030,  2009,  7126,  2256,  2495,
         2291,   102,  2009,  2003,  5094,  2256,  2495,  2291,  2035,
         2105,  1012,   102,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0],
       [  101,  2051,  1010,  2029,  3216,  2019,  2503,  3444,  1010,
         6732,  1996,  2265,  2038, 19840,  2098,  2125,  9906,  1998,
         2003,  2770,  2041,  1997,  4784,  1012,   102,  2051,  6732,
         1996,  2265,  2003,  9525,  1998,  4569,  1012,   102,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0],
       [  101,  1996, 10556,  2140, 11515,  2058,  1010,  2010,  2162,
         2252,  5689,  2013,  2010,  7223,  1012,   102,  2043,  1996,
        10556,  2140, 11515,  2058,  1010,  2010,  2252,  3062,  2000,
         1996,  2598,  1012,   102,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0],
       [  101, 13543,  1999,  2049,  6143,  2933,  2443,   102,  2025,
        13543,  1999,  6143,  2933,  2003,  2443,   102,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0,     0,     0,     0,     0,     0,
            0,     0,     0,     0]])`,highlighted:`array([[  <span class="hljs-number">101</span>,  <span class="hljs-number">2007</span>,  <span class="hljs-number">2032</span>,  <span class="hljs-number">2001</span>,  <span class="hljs-number">1037</span>, <span class="hljs-number">16480</span>,  <span class="hljs-number">3917</span>,  <span class="hljs-number">2594</span>,  <span class="hljs-number">4135</span>,
        <span class="hljs-number">23212</span>,  <span class="hljs-number">3070</span>,  <span class="hljs-number">2214</span>, <span class="hljs-number">10170</span>,  <span class="hljs-number">1010</span>,  <span class="hljs-number">2012</span>,  <span class="hljs-number">4356</span>,  <span class="hljs-number">1997</span>,  <span class="hljs-number">3183</span>,
         <span class="hljs-number">6838</span>, <span class="hljs-number">12953</span>,  <span class="hljs-number">2039</span>,  <span class="hljs-number">2000</span>,  <span class="hljs-number">1996</span>,  <span class="hljs-number">6147</span>,  <span class="hljs-number">1997</span>,  <span class="hljs-number">2010</span>,  <span class="hljs-number">2606</span>,
         <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,  <span class="hljs-number">6838</span>,  <span class="hljs-number">2001</span>,  <span class="hljs-number">3294</span>,  <span class="hljs-number">6625</span>,  <span class="hljs-number">3773</span>,  <span class="hljs-number">1996</span>,  <span class="hljs-number">2214</span>,
         <span class="hljs-number">2158</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>],
       [  <span class="hljs-number">101</span>,  <span class="hljs-number">1998</span>,  <span class="hljs-number">6814</span>,  <span class="hljs-number">2016</span>,  <span class="hljs-number">2234</span>,  <span class="hljs-number">2461</span>,  <span class="hljs-number">2153</span>,  <span class="hljs-number">1998</span>, <span class="hljs-number">13322</span>,
         <span class="hljs-number">2009</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,  <span class="hljs-number">2045</span>,  <span class="hljs-number">1005</span>,  <span class="hljs-number">1055</span>,  <span class="hljs-number">2053</span>,  <span class="hljs-number">3382</span>,  <span class="hljs-number">2008</span>,
         <span class="hljs-number">2016</span>,  <span class="hljs-number">1005</span>,  <span class="hljs-number">2222</span>,  <span class="hljs-number">3046</span>,  <span class="hljs-number">8103</span>,  <span class="hljs-number">2075</span>,  <span class="hljs-number">2009</span>,  <span class="hljs-number">2153</span>,  <span class="hljs-number">1012</span>,
          <span class="hljs-number">102</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>],
       [  <span class="hljs-number">101</span>,  <span class="hljs-number">1998</span>,  <span class="hljs-number">2007</span>,  <span class="hljs-number">1996</span>,  <span class="hljs-number">3712</span>,  <span class="hljs-number">4634</span>,  <span class="hljs-number">1010</span>,  <span class="hljs-number">2057</span>,  <span class="hljs-number">8108</span>,
         <span class="hljs-number">2025</span>,  <span class="hljs-number">3404</span>,  <span class="hljs-number">2028</span>,  <span class="hljs-number">1012</span>,  <span class="hljs-number">1996</span>,  <span class="hljs-number">2616</span>, <span class="hljs-number">18449</span>,  <span class="hljs-number">2125</span>,  <span class="hljs-number">1999</span>,
         <span class="hljs-number">1037</span>,  <span class="hljs-number">9666</span>,  <span class="hljs-number">1997</span>,  <span class="hljs-number">4100</span>,  <span class="hljs-number">8663</span>, <span class="hljs-number">11020</span>,  <span class="hljs-number">6313</span>,  <span class="hljs-number">2791</span>,  <span class="hljs-number">1998</span>,
         <span class="hljs-number">2431</span>,  <span class="hljs-number">1011</span>,  <span class="hljs-number">4301</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,  <span class="hljs-number">2028</span>,  <span class="hljs-number">1005</span>,  <span class="hljs-number">1055</span>,  <span class="hljs-number">5177</span>,
         <span class="hljs-number">2110</span>,  <span class="hljs-number">1998</span>,  <span class="hljs-number">3977</span>,  <span class="hljs-number">2000</span>,  <span class="hljs-number">2832</span>,  <span class="hljs-number">2106</span>,  <span class="hljs-number">2025</span>,  <span class="hljs-number">2689</span>,  <span class="hljs-number">2104</span>,
         <span class="hljs-number">2122</span>,  <span class="hljs-number">6214</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>],
       [  <span class="hljs-number">101</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">2001</span>,  <span class="hljs-number">1999</span>,  <span class="hljs-number">1037</span>, <span class="hljs-number">13090</span>,  <span class="hljs-number">5948</span>,  <span class="hljs-number">2007</span>,  <span class="hljs-number">2048</span>,
         <span class="hljs-number">2308</span>,  <span class="hljs-number">2006</span>,  <span class="hljs-number">2026</span>,  <span class="hljs-number">5001</span>,  <span class="hljs-number">2043</span>,  <span class="hljs-number">2026</span>,  <span class="hljs-number">2171</span>,  <span class="hljs-number">2001</span>,  <span class="hljs-number">2170</span>,
         <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">2001</span>,  <span class="hljs-number">3564</span>,  <span class="hljs-number">1999</span>,  <span class="hljs-number">2277</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>],
       [  <span class="hljs-number">101</span>,  <span class="hljs-number">2195</span>,  <span class="hljs-number">4279</span>,  <span class="hljs-number">2191</span>,  <span class="hljs-number">2039</span>,  <span class="hljs-number">1996</span>,  <span class="hljs-number">2181</span>,  <span class="hljs-number">2124</span>,  <span class="hljs-number">2004</span>,
         <span class="hljs-number">1996</span>,  <span class="hljs-number">2225</span>,  <span class="hljs-number">7363</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,  <span class="hljs-number">2045</span>,  <span class="hljs-number">2003</span>,  <span class="hljs-number">2069</span>,  <span class="hljs-number">2028</span>,
         <span class="hljs-number">2451</span>,  <span class="hljs-number">1999</span>,  <span class="hljs-number">1996</span>,  <span class="hljs-number">2225</span>,  <span class="hljs-number">7363</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>],
       [  <span class="hljs-number">101</span>,  <span class="hljs-number">2061</span>,  <span class="hljs-number">2008</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">2123</span>,  <span class="hljs-number">1005</span>,  <span class="hljs-number">1056</span>,  <span class="hljs-number">2113</span>,  <span class="hljs-number">2065</span>,
         <span class="hljs-number">2009</span>,  <span class="hljs-number">2428</span>, <span class="hljs-number">10654</span>,  <span class="hljs-number">7347</span>,  <span class="hljs-number">2030</span>,  <span class="hljs-number">2009</span>,  <span class="hljs-number">7126</span>,  <span class="hljs-number">2256</span>,  <span class="hljs-number">2495</span>,
         <span class="hljs-number">2291</span>,   <span class="hljs-number">102</span>,  <span class="hljs-number">2009</span>,  <span class="hljs-number">2003</span>,  <span class="hljs-number">5094</span>,  <span class="hljs-number">2256</span>,  <span class="hljs-number">2495</span>,  <span class="hljs-number">2291</span>,  <span class="hljs-number">2035</span>,
         <span class="hljs-number">2105</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>],
       [  <span class="hljs-number">101</span>,  <span class="hljs-number">2051</span>,  <span class="hljs-number">1010</span>,  <span class="hljs-number">2029</span>,  <span class="hljs-number">3216</span>,  <span class="hljs-number">2019</span>,  <span class="hljs-number">2503</span>,  <span class="hljs-number">3444</span>,  <span class="hljs-number">1010</span>,
         <span class="hljs-number">6732</span>,  <span class="hljs-number">1996</span>,  <span class="hljs-number">2265</span>,  <span class="hljs-number">2038</span>, <span class="hljs-number">19840</span>,  <span class="hljs-number">2098</span>,  <span class="hljs-number">2125</span>,  <span class="hljs-number">9906</span>,  <span class="hljs-number">1998</span>,
         <span class="hljs-number">2003</span>,  <span class="hljs-number">2770</span>,  <span class="hljs-number">2041</span>,  <span class="hljs-number">1997</span>,  <span class="hljs-number">4784</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,  <span class="hljs-number">2051</span>,  <span class="hljs-number">6732</span>,
         <span class="hljs-number">1996</span>,  <span class="hljs-number">2265</span>,  <span class="hljs-number">2003</span>,  <span class="hljs-number">9525</span>,  <span class="hljs-number">1998</span>,  <span class="hljs-number">4569</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>],
       [  <span class="hljs-number">101</span>,  <span class="hljs-number">1996</span>, <span class="hljs-number">10556</span>,  <span class="hljs-number">2140</span>, <span class="hljs-number">11515</span>,  <span class="hljs-number">2058</span>,  <span class="hljs-number">1010</span>,  <span class="hljs-number">2010</span>,  <span class="hljs-number">2162</span>,
         <span class="hljs-number">2252</span>,  <span class="hljs-number">5689</span>,  <span class="hljs-number">2013</span>,  <span class="hljs-number">2010</span>,  <span class="hljs-number">7223</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,  <span class="hljs-number">2043</span>,  <span class="hljs-number">1996</span>,
        <span class="hljs-number">10556</span>,  <span class="hljs-number">2140</span>, <span class="hljs-number">11515</span>,  <span class="hljs-number">2058</span>,  <span class="hljs-number">1010</span>,  <span class="hljs-number">2010</span>,  <span class="hljs-number">2252</span>,  <span class="hljs-number">3062</span>,  <span class="hljs-number">2000</span>,
         <span class="hljs-number">1996</span>,  <span class="hljs-number">2598</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>],
       [  <span class="hljs-number">101</span>, <span class="hljs-number">13543</span>,  <span class="hljs-number">1999</span>,  <span class="hljs-number">2049</span>,  <span class="hljs-number">6143</span>,  <span class="hljs-number">2933</span>,  <span class="hljs-number">2443</span>,   <span class="hljs-number">102</span>,  <span class="hljs-number">2025</span>,
        <span class="hljs-number">13543</span>,  <span class="hljs-number">1999</span>,  <span class="hljs-number">6143</span>,  <span class="hljs-number">2933</span>,  <span class="hljs-number">2003</span>,  <span class="hljs-number">2443</span>,   <span class="hljs-number">102</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,
            <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>]])`}}),ws=new w({props:{code:`labels = batch['labels'].numpy()
labels[indices]`,highlighted:`labels = batch[<span class="hljs-string">&#x27;labels&#x27;</span>].numpy()
labels[indices]`}}),qs=new w({props:{code:"array([2, 2, 2, 2, 2, 2, 2, 2, 2])",highlighted:'array([<span class="hljs-number">2</span>, <span class="hljs-number">2</span>, <span class="hljs-number">2</span>, <span class="hljs-number">2</span>, <span class="hljs-number">2</span>, <span class="hljs-number">2</span>, <span class="hljs-number">2</span>, <span class="hljs-number">2</span>, <span class="hljs-number">2</span>])'}}),Cs=new w({props:{code:"model.config.num_labels",highlighted:"model.config.num_labels"}}),Ts=new w({props:{code:"2",highlighted:'<span class="hljs-number">2</span>'}}),xs=new w({props:{code:`model = TFAutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=3)
model.compile(optimizer='adam')
model.fit(train_dataset)`,highlighted:`model = TFAutoModelForSequenceClassification.from_pretrained(model_checkpoint, <span class="hljs-attribute">num_labels</span>=3)
model.compile(<span class="hljs-attribute">optimizer</span>=<span class="hljs-string">&#x27;adam&#x27;</span>)
model.fit(train_dataset)`}}),Ps=new w({props:{code:"  869/24543 [>.............................] - ETA: 15:29 - loss: 1.1032",highlighted:'  <span class="hljs-number">869</span>/<span class="hljs-number">24543</span> [&gt;.............................] - ETA: <span class="hljs-number">15</span>:<span class="hljs-number">29</span> - loss: <span class="hljs-number">1.1032</span>'}}),Ns=new X({}),Ds=new w({props:{code:`from tensorflow.keras.optimizers import Adam

model = TFAutoModelForSequenceClassification.from_pretrained(model_checkpoint)
model.compile(optimizer=Adam(5e-5))`,highlighted:`<span class="hljs-keyword">from</span> tensorflow.keras.optimizers <span class="hljs-keyword">import</span> Adam

model = TFAutoModelForSequenceClassification.from_pretrained(model_checkpoint)
model.<span class="hljs-built_in">compile</span>(optimizer=Adam(<span class="hljs-number">5e-5</span>))`}}),Mn=new El({props:{$$slots:{default:[C0]},$$scope:{ctx:S}}}),Os=new w({props:{code:"model.fit(train_dataset)",highlighted:"model.fit(train_dataset)"}}),Bs=new w({props:{code:"319/24543 [..............................] - ETA: 16:07 - loss: 0.9718",highlighted:'<span class="hljs-number">319</span>/<span class="hljs-number">24543</span> [..............................] - ETA: <span class="hljs-number">16</span>:07 - loss: <span class="hljs-number">0.9718</span>'}}),Ss=new X({}),Ks=new X({}),Hn=new El({props:{$$slots:{default:[T0]},$$scope:{ctx:S}}}),zs=new X({}),Ms=new X({}),Vs=new w({props:{code:`input_ids = batch["input_ids"].numpy()
tokenizer.decode(input_ids[0])`,highlighted:`input_ids = batch[<span class="hljs-string">&quot;input_ids&quot;</span>].numpy()
tokenizer.decode(input_ids[<span class="hljs-number">0</span>])`}}),Fs=new w({props:{code:`labels = batch["labels"].numpy()
label = labels[0]`,highlighted:`labels = batch[<span class="hljs-string">&quot;labels&quot;</span>].numpy()
label = labels[<span class="hljs-number">0</span>]`}}),Hs=new X({}),Gs=new w({props:{code:`for batch in train_dataset:
    break

# \u0110\u1EA3m b\u1EA3o r\u1EB1ng b\u1EA1n \u0111\xE3 ch\u1EA1y model.compile() v\xE0 \u0111\u1EB7t tr\xECnh t\u1ED1i \u01B0u h\xF3a c\u1EE7a m\xECnh,
# v\xE0 m\u1EA5t m\xE1t/ch\u1EC9 s\u1ED1 c\u1EE7a b\u1EA1n n\u1EBFu b\u1EA1n \u0111ang s\u1EED d\u1EE5ng ch\xFAng

model.fit(batch, epochs=20)`,highlighted:`<span class="hljs-keyword">for</span> batch <span class="hljs-keyword">in</span> train_dataset:
    <span class="hljs-keyword">break</span>

<span class="hljs-comment"># \u0110\u1EA3m b\u1EA3o r\u1EB1ng b\u1EA1n \u0111\xE3 ch\u1EA1y model.compile() v\xE0 \u0111\u1EB7t tr\xECnh t\u1ED1i \u01B0u h\xF3a c\u1EE7a m\xECnh,</span>
<span class="hljs-comment"># v\xE0 m\u1EA5t m\xE1t/ch\u1EC9 s\u1ED1 c\u1EE7a b\u1EA1n n\u1EBFu b\u1EA1n \u0111ang s\u1EED d\u1EE5ng ch\xFAng</span>

model.fit(batch, epochs=<span class="hljs-number">20</span>)`}}),In=new El({props:{$$slots:{default:[x0]},$$scope:{ctx:S}}}),Jn=new El({props:{warning:!0,$$slots:{default:[P0]},$$scope:{ctx:S}}}),Ls=new X({}),Us=new X({}),{c(){b=c("meta"),E=m(),o(d.$$.fragment),_=m(),P=c("h1"),T=c("a"),N=c("span"),o(D.$$.fragment),en=m(),pn=c("span"),ls=h("G\u1EE1 l\u1ED7i quy tr\xECnh hu\u1EA5n luy\u1EC7n"),J=m(),o(H.$$.fragment),_n=m(),A=c("p"),K=h("B\u1EA1n \u0111\xE3 vi\u1EBFt m\u1ED9t k\u1ECBch b\u1EA3n tuy\u1EC7t \u0111\u1EB9p \u0111\u1EC3 hu\u1EA5n luy\u1EC7n ho\u1EB7c tinh ch\u1EC9nh m\u1ED9t m\xF4 h\xECnh trong m\u1ED9t t\xE1c v\u1EE5 nh\u1EA5t \u0111\u1ECBnh, tu\xE2n th\u1EE7 m\u1ED9t c\xE1ch nghi\xEAm t\xFAc l\u1EDDi khuy\xEAn t\u1EEB "),W=c("a"),rn=h("Ch\u01B0\u01A1ng 7"),ts=h(". Nh\u01B0ng khi b\u1EA1n kh\u1EDFi ch\u1EA1y l\u1EC7nh "),mn=c("code"),En=h("model.fit()"),Y=h(", m\u1ED9t \u0111i\u1EC1u kinh kh\u1EE7ng x\u1EA3y ra: b\u1EA1n g\u1EB7p l\u1ED7i \u{1F631}! Ho\u1EB7c t\u1EC7 h\u01A1n, m\u1ECDi th\u1EE9 d\u01B0\u1EDDng nh\u01B0 \u1ED5n v\xE0 qu\xE1 tr\xECnh hu\u1EA5n luy\u1EC7n ch\u1EA1y m\xE0 kh\xF4ng c\xF3 l\u1ED7i, nh\u01B0ng m\xF4 h\xECnh k\u1EBFt qu\u1EA3 l\xE0 t\u1ED3i t\u1EC7. Trong ph\u1EA7n n\xE0y, ch\xFAng t\xF4i s\u1EBD ch\u1EC9 cho b\u1EA1n nh\u1EEFng g\xEC b\u1EA1n c\xF3 th\u1EC3 l\xE0m \u0111\u1EC3 g\u1EE1 l\u1ED7i c\xE1c lo\u1EA1i v\u1EA5n \u0111\u1EC1 n\xE0y."),wn=m(),o(q.$$.fragment),C=m(),G=c("p"),sa=h("V\u1EA5n \u0111\u1EC1 khi b\u1EA1n g\u1EB7p l\u1ED7i trong  "),qn=c("code"),aa=h("model.fit()"),Cn=h("  c\xF3 th\u1EC3 \u0111\u1EBFn t\u1EEB nhi\u1EC1u ngu\u1ED3n, v\xEC vi\u1EC7c hu\u1EA5n luy\u1EC7n th\u01B0\u1EDDng t\u1EADp h\u1EE3p r\u1EA5t nhi\u1EC1u th\u1EE9 l\u1EA1i v\u1EDBi nhau. V\u1EA5n \u0111\u1EC1 c\xF3 th\u1EC3 l\xE0 m\u1ED9t c\xE1i g\xEC \u0111\xF3 sai trong b\u1ED9 d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n ho\u1EB7c m\u1ED9t s\u1ED1 v\u1EA5n \u0111\u1EC1 khi c\u1ED1 g\u1EAFng k\u1EBFt h\u1EE3p h\xE0ng lo\u1EA1t c\xE1c ph\u1EA7n t\u1EED c\u1EE7a b\u1ED9 d\u1EEF li\u1EC7u v\u1EDBi nhau. Sau \u0111\xF3, n\xF3 l\u1EA5y m\u1ED9t lo\u1EA1t d\u1EEF li\u1EC7u v\xE0 \u0111\u01B0a n\xF3 v\xE0o m\xF4 h\xECnh, v\xEC v\u1EADy v\u1EA5n \u0111\u1EC1 c\xF3 th\u1EC3 n\u1EB1m \u1EDF m\xE3 m\xF4 h\xECnh. Sau \u0111\xF3, n\xF3 t\xEDnh to\xE1n c\xE1c \u0111\u1ED9 d\u1ED1c v\xE0 th\u1EF1c hi\u1EC7n b\u01B0\u1EDBc t\u1ED1i \u01B0u h\xF3a, v\xEC v\u1EADy v\u1EA5n \u0111\u1EC1 c\u0169ng c\xF3 th\u1EC3 n\u1EB1m trong tr\xECnh t\u1ED1i \u01B0u h\xF3a c\u1EE7a b\u1EA1n. V\xE0 ngay c\u1EA3 khi m\u1ECDi th\u1EE9 di\u1EC5n ra t\u1ED1t \u0111\u1EB9p cho qu\xE1 tr\xECnh hu\u1EA5n luy\u1EC7n, v\u1EABn c\xF3 th\u1EC3 x\u1EA3y ra s\u1EF1 c\u1ED1 trong qu\xE1 tr\xECnh \u0111\xE1nh gi\xE1 n\u1EBFu c\xF3 v\u1EA5n \u0111\u1EC1 v\u1EDBi ch\u1EC9 s\u1ED1 c\u1EE7a b\u1EA1n."),cs=m(),L=c("p"),Bc=h("C\xE1ch t\u1ED1t nh\u1EA5t \u0111\u1EC3 g\u1EE1 l\u1ED7i ph\xE1t sinh trong "),za=c("code"),Sc=h("model.fit()"),Kc=h(" l\xE0 \u0111i qua to\xE0n pipeline n\xE0y theo c\xE1ch th\u1EE7 c\xF4ng \u0111\u1EC3 xem m\u1ECDi th\u1EE9 di\u1EC5n ra nh\u01B0 th\u1EBF n\xE0o. Sau \u0111\xF3, l\u1ED7i th\u01B0\u1EDDng r\u1EA5t d\u1EC5 gi\u1EA3i quy\u1EBFt."),wl=m(),Tn=c("p"),zc=h("\u0110\u1EC3 ch\u1EE9ng minh \u0111i\u1EC1u n\xE0y, ch\xFAng ta s\u1EBD s\u1EED d\u1EE5ng t\u1EADp l\u1EC7nh (c\u1ED1 g\u1EAFng) tinh ch\u1EC9nh m\xF4 h\xECnh DistilBERT tr\xEAn "),es=c("a"),Mc=h("t\u1EADp d\u1EEF li\u1EC7u MNLI"),Vc=h(":"),ql=m(),o(ps.$$.fragment),Cl=m(),xn=c("p"),Fc=h("N\u1EBFu b\u1EA1n c\u1ED1 g\u1EAFng th\u1EF1c thi n\xF3, b\u1EA1n c\xF3 th\u1EC3 nh\u1EADn \u0111\u01B0\u1EE3c m\u1ED9t s\u1ED1 "),Ma=c("code"),Hc=h("VisibleDeprecationWarning"),Gc=h(" khi th\u1EF1c hi\u1EC7n chuy\u1EC3n \u0111\u1ED5i t\u1EADp d\u1EEF li\u1EC7u - \u0111\xE2y l\xE0 m\u1ED9t v\u1EA5n \u0111\u1EC1 UX \u0111\xE3 bi\u1EBFt m\xE0 ch\xFAng ta g\u1EB7p ph\u1EA3i, v\xEC v\u1EADy vui l\xF2ng b\u1ECF qua n\xF3. N\u1EBFu b\u1EA1n \u0111ang \u0111\u1ECDc kh\xF3a h\u1ECDc sau \u0111\xF3, ch\u1EB3ng h\u1EA1n nh\u01B0 th\xE1ng 11 n\u0103m 2021 v\xE0 n\xF3 v\u1EABn \u0111ang di\u1EC5n ra, th\xEC h\xE3y g\u1EEDi nh\u1EEFng d\xF2ng tweet gi\u1EADn d\u1EEF t\u1EA1i @carrigmat cho \u0111\u1EBFn khi anh \u1EA5y s\u1EEDa n\xF3."),Tl=m(),ha=c("p"),Lc=h("Tuy nhi\xEAn, m\u1ED9t v\u1EA5n \u0111\u1EC1 nghi\xEAm tr\u1ECDng h\u01A1n l\xE0 ch\xFAng ta nh\u1EADn \u0111\u01B0\u1EE3c m\u1ED9t l\u1ED7i tr\u1ECDn v\u1EB9n. V\xE0 n\xF3 th\u1EF1c s\u1EF1 r\u1EA5t d\xE0i:"),xl=m(),o(rs.$$.fragment),Pl=m(),la=c("p"),Uc=h("\u0110i\u1EC1u \u0111\xF3 ngh\u0129a l\xE0 g\xEC? Ch\xFAng ta \u0111\xE3 c\u1ED1 g\u1EAFng hu\u1EA5n luy\u1EC7n tr\xEAn d\u1EEF li\u1EC7u c\u1EE7a m\xECnh, nh\u01B0ng ch\xFAng ta kh\xF4ng c\xF3 gradient? \u0110i\u1EC1u n\xE0y kh\xE1 b\u1ED1i r\u1ED1i; l\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ch\xFAng ta th\u1EADm ch\xED b\u1EAFt \u0111\u1EA7u g\u1EE1 l\u1ED7i m\u1ED9t c\xE1i g\xEC \u0111\xF3 nh\u01B0 v\u1EADy? Khi l\u1ED7i b\u1EA1n g\u1EB7p ph\u1EA3i kh\xF4ng g\u1EE3i \xFD ngay v\u1EA5n \u0111\u1EC1 n\u1EB1m \u1EDF \u0111\xE2u, gi\u1EA3i ph\xE1p t\u1ED1t nh\u1EA5t th\u01B0\u1EDDng l\xE0 th\u1EF1c hi\u1EC7n m\u1ECDi th\u1EE9 theo tr\xECnh t\u1EF1, \u0111\u1EA3m b\u1EA3o \u1EDF m\u1ED7i giai \u0111o\u1EA1n m\u1ECDi th\u1EE9 \u0111\u1EC1u \u1ED5n. V\xE0 t\u1EA5t nhi\xEAn, n\u01A1i b\u1EAFt \u0111\u1EA7u lu\xF4n l\xE0\u2026"),Nl=m(),un=c("h3"),Pn=c("a"),Va=c("span"),o(ms.$$.fragment),Rc=m(),Fa=c("span"),Ic=h("Ki\u1EC3m tra d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n"),Al=m(),ta=c("p"),Xc=h("\u0110i\u1EC1u n\xE0y kh\xF4ng c\u1EA7n ph\u1EA3i n\xF3i, nh\u01B0ng n\u1EBFu d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n b\u1ECB h\u1ECFng, Keras s\u1EBD kh\xF4ng th\u1EC3 s\u1EEDa n\xF3 cho b\u1EA1n. V\xEC v\u1EADy, \u0111i\u1EC1u \u0111\u1EA7u ti\xEAn, b\u1EA1n c\u1EA7n ph\u1EA3i xem x\xE9t nh\u1EEFng g\xEC b\xEAn trong b\u1ED9 hu\u1EA5n luy\u1EC7n c\u1EE7a b\u1EA1n."),Dl=m(),x=c("p"),Jc=h("M\u1EB7c d\xF9 r\u1EA5t h\u1EA5p d\u1EABn khi nh\xECn v\xE0o b\xEAn trong "),Ha=c("code"),Wc=h("raw_datasets"),Yc=h(" v\xE0 "),Ga=c("code"),Zc=h("tokenized_datasets"),Qc=h(", ch\xFAng t\xF4i th\u1EF1c s\u1EF1 khuy\xEAn b\u1EA1n n\xEAn truy c\u1EADp d\u1EEF li\u1EC7u ngay t\u1EA1i \u0111i\u1EC3m m\xE0 n\xF3 \u0111\u01B0\u1EE3c \u0111\u01B0a v\xE0o m\xF4 h\xECnh. \u0110i\u1EC1u \u0111\xF3 c\xF3 ngh\u0129a l\xE0 \u0111\u1ECDc k\u1EBFt qu\u1EA3 \u0111\u1EA7u ra t\u1EEB "),La=c("code"),ne=h("tf.data.Dataset"),se=h(" m\xE0 b\u1EA1n \u0111\xE3 t\u1EA1o b\u1EB1ng h\xE0m "),Ua=c("code"),ae=h("to_tf_dataset()"),he=h("! V\xEC v\u1EADy, l\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ch\xFAng ta l\xE0m \u0111i\u1EC1u \u0111\xF3? C\xE1c \u0111\u1ED1i t\u01B0\u1EE3ng "),Ra=c("code"),le=h("tf.data.Dataset"),te=h(" cung c\u1EA5p cho ch\xFAng ta to\xE0n b\u1ED9 c\xE1c l\xF4 c\xF9ng m\u1ED9t l\xFAc v\xE0 kh\xF4ng h\u1ED7 tr\u1EE3 l\u1EADp ch\u1EC9 m\u1EE5c, v\xEC v\u1EADy ch\xFAng ta kh\xF4ng th\u1EC3 ch\u1EC9 y\xEAu c\u1EA7u "),Ia=c("code"),ce=h("train_dataset[0]"),ee=h(". Tuy nhi\xEAn, ch\xFAng ta c\xF3 th\u1EC3 y\xEAu c\u1EA7u n\xF3 m\u1ED9t c\xE1ch l\u1ECBch s\u1EF1 cho m\u1ED9t l\xF4:"),Ol=m(),o(us.$$.fragment),Bl=m(),U=c("p"),Xa=c("code"),pe=h("break"),re=h(" k\u1EBFt th\xFAc v\xF2ng l\u1EB7p sau m\u1ED9t l\u1EA7n l\u1EB7p, v\xEC v\u1EADy, \u0111i\u1EC1u n\xE0y l\u1EA5y l\xF4 \u0111\u1EA7u ti\xEAn ra kh\u1ECFi "),Ja=c("code"),me=h("train_dataset"),ue=h(" v\xE0 l\u01B0u n\xF3 d\u01B0\u1EDBi d\u1EA1ng "),Wa=c("code"),ie=h("batch"),be=h(". B\xE2y gi\u1EDD, ch\xFAng ta h\xE3y xem nh\u1EEFng g\xEC b\xEAn trong:"),Sl=m(),o(is.$$.fragment),Kl=m(),z=c("p"),oe=h("\u0110i\u1EC1u n\xE0y c\xF3 v\u1EBB \u0111\xFAng, ph\u1EA3i kh\xF4ng? Ch\xFAng ta \u0111ang chuy\u1EC3n c\xE1c nh\xE3n "),Ya=c("code"),ge=h("labels"),je=h(", "),Za=c("code"),fe=h("attention_mask"),ve=h(", v\xE0 "),Qa=c("code"),ye=h("input_ids"),de=h(" cho m\xF4 h\xECnh, \u0111\xE2y s\u1EBD l\xE0 m\u1ECDi th\u1EE9 n\xF3 c\u1EA7n \u0111\u1EC3 t\xEDnh to\xE1n k\u1EBFt qu\u1EA3 \u0111\u1EA7u ra v\xE0 t\xEDnh to\xE1n m\u1EA5t m\xE1t. V\u1EADy t\u1EA1i sao ch\xFAng ta kh\xF4ng c\xF3 m\u1ED9t gradient? Nh\xECn k\u1EF9 h\u01A1n: ch\xFAng ta \u0111ang chuy\u1EC3n m\u1ED9t t\u1EEB \u0111i\u1EC3n duy nh\u1EA5t l\xE0m \u0111\u1EA7u v\xE0o, nh\u01B0ng m\u1ED9t l\xF4 hu\u1EA5n luy\u1EC7n th\u01B0\u1EDDng l\xE0 m\u1ED9t tensor \u0111\u1EA7u v\xE0o ho\u1EB7c t\u1EEB \u0111i\u1EC3n, c\u1ED9ng v\u1EDBi m\u1ED9t tensor nh\xE3n. Nh\xE3n c\u1EE7a ch\xFAng ta l\xE0 m\u1ED9t ch\xECa kh\xF3a trong t\u1EEB \u0111i\u1EC3n \u0111\u1EA7u v\xE0o c\u1EE7a m\xECnh."),zl=m(),Nn=c("p"),ke=h("\u0110\xE2y c\xF3 pha\u0309i l\xE0 v\u1EA5n \u0111\xEA? Kh\xF4ng ph\u1EA3i l\xFAc n\xE0o c\u0169ng v\u1EADy! Nh\u01B0ng \u0111\xF3 l\xE0 m\u1ED9t trong nh\u1EEFng v\u1EA5n \u0111\u1EC1 ph\u1ED5 bi\u1EBFn nh\u1EA5t m\xE0 b\u1EA1n s\u1EBD g\u1EB7p ph\u1EA3i khi hu\u1EA5n luy\u1EC7n c\xE1c m\xF4 h\xECnh Transformer v\u1EDBi TensorFlow. T\u1EA5t c\u1EA3 c\xE1c m\xF4 h\xECnh c\u1EE7a ch\xFAng ta \u0111\u1EC1u c\xF3 th\u1EC3 t\xEDnh to\xE1n m\u1EA5t m\xE1t trong n\u1ED9i b\u1ED9, nh\u01B0ng \u0111\u1EC3 l\xE0m \u0111\u01B0\u1EE3c \u0111i\u1EC1u \u0111\xF3, c\xE1c nh\xE3n c\u1EA7n \u0111\u01B0\u1EE3c chuy\u1EC3n v\xE0o t\u1EEB \u0111i\u1EC3n \u0111\u1EA7u v\xE0o. \u0110\xE2y l\xE0 m\u1EA5t m\xE1t \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng khi ch\xFAng ta kh\xF4ng ch\u1EC9 \u0111\u1ECBnh gi\xE1 tr\u1ECB t\u1ED5n th\u1EA5t cho "),nh=c("code"),$e=h("compile()"),_e=h(". M\u1EB7t kh\xE1c, Keras th\u01B0\u1EDDng mong \u0111\u1EE3i c\xE1c nh\xE3n \u0111\u01B0\u1EE3c chuy\u1EC3n ri\xEAng kh\u1ECFi t\u1EEB \u0111i\u1EC3n \u0111\u1EA7u v\xE0o v\xE0 c\xE1c t\xEDnh to\xE1n t\u1ED5n th\u1EA5t th\u01B0\u1EDDng s\u1EBD th\u1EA5t b\u1EA1i n\u1EBFu b\u1EA1n kh\xF4ng l\xE0m \u0111i\u1EC1u \u0111\xF3."),Ml=m(),Z=c("p"),Ee=h("V\u1EA5n \u0111\u1EC1 gi\u1EDD \u0111\xE3 tr\u1EDF n\xEAn r\xF5 r\xE0ng h\u01A1n: ch\xFAng ta \u0111\xE3 th\xF4ng qua tham s\u1ED1 "),sh=c("code"),we=h("loss"),qe=h(", c\xF3 ngh\u0129a l\xE0 ch\xFAng ta \u0111ang y\xEAu c\u1EA7u Keras t\xEDnh to\xE1n kho\u1EA3n m\u1EA5t m\xE1t c\u1EE7a m\xECnh, nh\u01B0ng ch\xFAng ta \u0111\xE3 chuy\u1EC3n nh\xE3n c\u1EE7a m\xECnh l\xE0m \u0111\u1EA7u v\xE0o cho m\xF4 h\xECnh, kh\xF4ng ph\u1EA3i l\xE0 nh\xE3n \u1EDF n\u01A1i Keras mong \u0111\u1EE3i ch\xFAng! Ch\xFAng ta c\u1EA7n ch\u1ECDn c\xE1i n\xE0y hay c\xE1i kia: ho\u1EB7c ch\xFAng ta s\u1EED d\u1EE5ng t\u1ED5n th\u1EA5t b\xEAn trong c\u1EE7a m\xF4 h\xECnh v\xE0 gi\u1EEF c\xE1c nh\xE3n \u1EDF v\u1ECB tr\xED c\u1EE7a ch\xFAng, ho\u1EB7c ch\xFAng ta ti\u1EBFp t\u1EE5c s\u1EED d\u1EE5ng t\u1ED5n th\u1EA5t Keras, nh\u01B0ng ch\xFAng ta chuy\u1EC3n c\xE1c nh\xE3n \u0111\u1EBFn n\u01A1i m\xE0 Keras mong \u0111\u1EE3i ch\xFAng. \u0110\u1EC3 \u0111\u01A1n gi\u1EA3n, ch\xFAng ta h\xE3y th\u1EF1c hi\u1EC7n c\xE1ch ti\u1EBFp c\u1EADn \u0111\u1EA7u ti\xEAn. Thay \u0111\u1ED5i l\u1EC7nh g\u1ECDi th\xE0nh "),ah=c("code"),Ce=h("compile()"),Te=h(" \u0111\u1EC3 \u0111\u1ECDc:"),Vl=m(),o(bs.$$.fragment),Fl=m(),ca=c("p"),xe=h("B\xE2y gi\u1EDD ch\xFAng ta s\u1EBD s\u1EED d\u1EE5ng m\u1EA5t m\xE1t b\xEAn trong c\u1EE7a m\xF4 h\xECnh v\xE0 v\u1EA5n \u0111\u1EC1 n\xE0y s\u1EBD \u0111\u01B0\u1EE3c gi\u1EA3i quy\u1EBFt!"),Hl=m(),o(An.$$.fragment),Gl=m(),Dn=c("p"),Pe=h("B\xE2y gi\u1EDD, ch\xFAng ta h\xE3y th\u1EED hu\u1EA5n luy\u1EC7n. B\xE2y gi\u1EDD ch\xFAng ta s\u1EBD nh\u1EADn \u0111\u01B0\u1EE3c gradient, v\xEC v\u1EADy hy v\u1ECDng (nh\u1EA1c \u0111\xE1ng ng\u1EA1i ph\xE1t \u1EDF \u0111\xE2y) ch\xFAng ta c\xF3 th\u1EC3 g\u1ECDi "),hh=c("code"),Ne=h("model.fit()"),Ae=h(" v\xE0 m\u1ECDi th\u1EE9 s\u1EBD ho\u1EA1t \u0111\u1ED9ng t\u1ED1t!"),Ll=m(),o(os.$$.fragment),Ul=m(),ea=c("p"),De=h("\xD4i kh\xF4ng."),Rl=m(),gs=c("p"),lh=c("code"),Oe=h("nan"),Be=h(" kh\xF4ng ph\u1EA3i l\xE0 m\u1ED9t gi\xE1 tr\u1ECB m\u1EA5t m\xE1t \u0111\xE1ng kh\xEDch l\u1EC7. Tuy nhi\xEAn, ch\xFAng ta \u0111\xE3 ki\u1EC3m tra d\u1EEF li\u1EC7u c\u1EE7a m\xECnh v\xE0 n\xF3 tr\xF4ng kh\xE1 \u1ED5n. N\u1EBFu \u0111\xF3 kh\xF4ng ph\u1EA3i l\xE0 v\u1EA5n \u0111\u1EC1, ch\xFAng ta c\xF3 th\u1EC3 \u0111i \u0111\xE2u ti\u1EBFp theo? B\u01B0\u1EDBc ti\u1EBFp theo r\xF5 r\xE0ng l\xE0 \u2026"),Il=m(),bn=c("h3"),On=c("a"),th=c("span"),o(js.$$.fragment),Se=m(),ch=c("span"),Ke=h("Ki\u1EC3m tra m\xF4 h\xECnh c\u1EE7a b\u1EA1n"),Xl=m(),R=c("p"),eh=c("code"),ze=h("model.fit()"),Me=h(" l\xE0 m\u1ED9t h\xE0m ti\u1EC7n l\u1EE3i th\u1EF1c s\u1EF1 tuy\u1EC7t v\u1EDDi trong Keras, nh\u01B0ng n\xF3 l\xE0m \u0111\u01B0\u1EE3c r\u1EA5t nhi\u1EC1u th\u1EE9 cho b\u1EA1n v\xE0 \u0111i\u1EC1u \u0111\xF3 c\xF3 th\u1EC3 khi\u1EBFn vi\u1EC7c t\xECm ch\xEDnh x\xE1c v\u1ECB tr\xED \u0111\xE3 x\u1EA3y ra s\u1EF1 c\u1ED1 tr\u1EDF n\xEAn kh\xF3 kh\u0103n h\u01A1n. N\u1EBFu b\u1EA1n \u0111ang g\u1EE1 l\u1ED7i m\xF4 h\xECnh c\u1EE7a m\xECnh, m\u1ED9t chi\u1EBFn l\u01B0\u1EE3c th\u1EF1c s\u1EF1 c\xF3 th\u1EC3 h\u1EEFu \xEDch l\xE0 ch\u1EC9 chuy\u1EC3n m\u1ED9t l\xF4 duy nh\u1EA5t cho m\xF4 h\xECnh v\xE0 xem x\xE9t chi ti\u1EBFt k\u1EBFt qu\u1EA3 \u0111\u1EA7u ra c\u1EE7a m\u1ED9t l\xF4 \u0111\xF3. M\u1ED9t m\u1EB9o th\u1EF1c s\u1EF1 h\u1EEFu \xEDch kh\xE1c n\u1EBFu m\xF4 h\xECnh \u0111ang g\u1EB7p l\u1ED7i l\xE0 "),ph=c("code"),Ve=h("compile()"),Fe=h(" m\xF4 h\xECnh v\u1EDBi "),rh=c("code"),He=h("run_eagerly=True"),Ge=h(". \u0110i\u1EC1u n\xE0y s\u1EBD l\xE0m cho n\xF3 ch\u1EADm h\u01A1n r\u1EA5t nhi\u1EC1u, nh\u01B0ng n\xF3 s\u1EBD l\xE0m cho c\xE1c th\xF4ng b\xE1o l\u1ED7i d\u1EC5 hi\u1EC3u h\u01A1n nhi\u1EC1u, b\u1EDFi v\xEC ch\xFAng s\u1EBD ch\u1EC9 ra ch\xEDnh x\xE1c v\u1ECB tr\xED x\u1EA3y ra s\u1EF1 c\u1ED1 trong m\xE3 m\xF4 h\xECnh c\u1EE7a b\u1EA1n."),Jl=m(),Q=c("p"),Le=h("Tuy nhi\xEAn, hi\u1EC7n t\u1EA1i, ch\xFAng ta ch\u01B0a c\u1EA7n \u0111\u1EBFn "),mh=c("code"),Ue=h("run_eagerly"),Re=h(". H\xE3y ch\u1EA1y "),uh=c("code"),Ie=h("batch"),Xe=h(" m\xE0 ch\xFAng ta \u0111\xE3 c\xF3 tr\u01B0\u1EDBc \u0111\xF3 th\xF4ng qua m\xF4 h\xECnh v\xE0 xem k\u1EBFt qu\u1EA3 \u0111\u1EA7u ra tr\xF4ng nh\u01B0 th\u1EBF n\xE0o:"),Wl=m(),o(fs.$$.fragment),Yl=m(),o(vs.$$.fragment),Zl=m(),k=c("p"),Je=h("Ch\xE0, \u0111i\u1EC1u n\xE0y th\u1EADt kh\xF3. M\u1ECDi th\u1EE9 \u0111\u1EC1u l\xE0 "),ih=c("code"),We=h("nan"),Ye=h("! Nh\u01B0ng th\u1EADt l\u1EA1 ph\u1EA3i kh\xF4ng? L\xE0m th\u1EBF n\xE0o m\xE0 t\u1EA5t c\u1EA3 nh\u1EADt k\xFD c\u1EE7a ch\xFAng ta s\u1EBD tr\u1EDF th\xE0nh "),bh=c("code"),Ze=h("nan"),Qe=h("? "),oh=c("code"),np=h("nan"),sp=h(" c\xF3 ngh\u0129a l\xE0 \u201Ckh\xF4ng ph\u1EA3i l\xE0 s\u1ED1\u201D. Gi\xE1 tr\u1ECB "),gh=c("code"),ap=h("nan"),hp=h(" th\u01B0\u1EDDng x\u1EA3y ra khi b\u1EA1n th\u1EF1c hi\u1EC7n m\u1ED9t thao t\xE1c b\u1ECB c\u1EA5m, ch\u1EB3ng h\u1EA1n nh\u01B0 chia cho s\u1ED1 kh\xF4ng. Nh\u01B0ng m\u1ED9t \u0111i\u1EC1u r\u1EA5t quan tr\u1ECDng c\u1EA7n bi\u1EBFt v\u1EC1 "),jh=c("code"),lp=h("nan"),tp=h(" trong h\u1ECDc m\xE1y l\xE0 gi\xE1 tr\u1ECB n\xE0y c\xF3 xu h\u01B0\u1EDBng "),fh=c("em"),cp=h("lan truy\u1EC1n"),ep=h(". N\u1EBFu b\u1EA1n nh\xE2n m\u1ED9t s\u1ED1 v\u1EDBi "),vh=c("code"),pp=h("nan"),rp=h(", k\u1EBFt qu\u1EA3 c\u0169ng l\xE0 "),yh=c("code"),mp=h("nan"),up=h(". V\xE0 n\u1EBFu b\u1EA1n nh\u1EADn \u0111\u01B0\u1EE3c m\u1ED9t "),dh=c("code"),ip=h("nan"),bp=h(" \u1EDF b\u1EA5t k\u1EF3 \u0111\xE2u trong \u0111\u1EA7u ra, s\u1EF1 m\u1EA5t m\xE1t ho\u1EB7c \u0111\u1ED9 d\u1ED1c c\u1EE7a b\u1EA1n, th\xEC n\xF3 s\u1EBD nhanh ch\xF3ng lan r\u1ED9ng ra to\xE0n b\u1ED9 m\xF4 h\xECnh c\u1EE7a b\u1EA1n - b\u1EDFi v\xEC khi gi\xE1 tr\u1ECB "),kh=c("code"),op=h("nan"),gp=h(" \u0111\xF3 \u0111\u01B0\u1EE3c truy\u1EC1n tr\u1EDF l\u1EA1i qua m\u1EA1ng c\u1EE7a b\u1EA1n, b\u1EA1n s\u1EBD nh\u1EADn \u0111\u01B0\u1EE3c "),$h=c("code"),jp=h("nan"),fp=h(" gradient v\xE0 khi c\u1EADp nh\u1EADt tr\u1ECDng s\u1ED1 \u0111\u01B0\u1EE3c t\xEDnh to\xE1n v\u1EDBi nh\u1EEFng gradient \u0111\xF3, b\u1EA1n s\u1EBD nh\u1EADn \u0111\u01B0\u1EE3c tr\u1ECDng s\u1ED1 "),_h=c("code"),vp=h("nan"),yp=h(" v\xE0 nh\u1EEFng tr\u1ECDng s\u1ED1 \u0111\xF3 s\u1EBD t\xEDnh to\xE1n nhi\u1EC1u k\u1EBFt qu\u1EA3 \u0111\u1EA7u ra "),Eh=c("code"),dp=h("nan"),kp=h(" h\u01A1n n\u1EEFa! Ch\u1EB3ng bao l\xE2u n\u1EEFa, to\xE0n b\u1ED9 m\u1EA1ng l\u01B0\u1EDBi s\u1EBD ch\u1EC9 l\xE0 m\u1ED9t kh\u1ED1i l\u1EDBn g\u1ED3m c\xE1c gi\xE1 tr\u1ECB "),wh=c("code"),$p=h("nan"),_p=h(". M\u1ED9t khi \u0111i\u1EC1u \u0111\xF3 x\u1EA3y ra, th\u1EADt kh\xF3 \u0111\u1EC3 xem v\u1EA5n \u0111\u1EC1 b\u1EAFt \u0111\u1EA7u t\u1EEB \u0111\xE2u. L\xE0m th\u1EBF n\xE0o ch\xFAng ta c\xF3 th\u1EC3 c\xF4 l\u1EADp n\u01A1i m\xE0 "),qh=c("code"),Ep=h("nan"),wp=h(" len l\u1ECFi \u0111\u1EA7u ti\xEAn?"),Ql=m(),M=c("p"),qp=h("C\xE2u tr\u1EA3 l\u1EDDi l\xE0 h\xE3y th\u1EED "),Ch=c("em"),Cp=h("kh\u1EDFi \u0111\u1ED9ng l\u1EA1i"),Tp=h(" m\xF4 h\xECnh. Khi ch\xFAng ta b\u1EAFt \u0111\u1EA7u hu\u1EA5n luy\u1EC7n, ch\xFAng ta c\xF3 m\u1ED9t "),Th=c("code"),xp=h("nan"),Pp=h(" \u1EDF \u0111\xE2u \u0111\xF3 v\xE0 n\xF3 nhanh ch\xF3ng \u0111\u01B0\u1EE3c truy\u1EC1n b\xE1 qua to\xE0n b\u1ED9 m\xF4 h\xECnh. V\xEC v\u1EADy, h\xE3y t\u1EA3i m\xF4 h\xECnh t\u1EEB m\u1ED9t checkpoint v\xE0 kh\xF4ng th\u1EF1c hi\u1EC7n b\u1EA5t k\u1EF3 c\u1EADp nh\u1EADt tr\u1ECDng s\u1ED1 n\xE0o v\xE0 xem n\u01A1i ch\xFAng ta nh\u1EADn \u0111\u01B0\u1EE3c gi\xE1 tr\u1ECB "),xh=c("code"),Np=h("nan"),Ap=h(":"),nt=m(),o(ys.$$.fragment),st=m(),pa=c("p"),Dp=h("When we run that, we get:"),at=m(),o(ds.$$.fragment),ht=m(),I=c("p"),Ph=c("em"),Op=h("B\xE2y gi\u1EDD"),Bp=h(" ch\xFAng ta \u0111ang \u0111\u1EBFn m\u1ED9t n\u01A1i n\xE0o \u0111\xF3! Kh\xF4ng c\xF3 gi\xE1 tr\u1ECB "),Nh=c("code"),Sp=h("nan"),Kp=h(" n\xE0o trong nh\u1EADt k\xFD c\u1EE7a m\xECnh, \u0111i\u1EC1u n\xE0y khi\u1EBFn b\u1EA1n y\xEAn t\xE2m. Nh\u01B0ng ch\xFAng ta th\u1EA5y c\xF3 m\u1ED9t v\xE0i gi\xE1 tr\u1ECB "),Ah=c("code"),zp=h("nan"),Mp=h(" b\u1ECB m\u1EA5t! C\xF3 \u0111i\u1EC1u g\xEC \u0111\xF3 \u0111\u1EB7c bi\u1EC7t v\u1EC1 c\xE1c m\u1EABu \u0111\xF3 g\xE2y ra v\u1EA5n \u0111\u1EC1 n\xE0y kh\xF4ng? H\xE3y xem ch\xFAng l\xE0 nh\u1EEFng c\xE1i n\xE0o (l\u01B0u \xFD r\u1EB1ng n\u1EBFu b\u1EA1n t\u1EF1 ch\u1EA1y m\xE3 n\xE0y, b\u1EA1n c\xF3 th\u1EC3 nh\u1EADn \u0111\u01B0\u1EE3c c\xE1c ch\u1EC9 s\u1ED1 kh\xE1c nhau v\xEC t\u1EADp d\u1EEF li\u1EC7u \u0111\xE3 b\u1ECB x\xE1o tr\u1ED9n):"),lt=m(),o(ks.$$.fragment),tt=m(),o($s.$$.fragment),ct=m(),ra=c("p"),Vp=h("H\xE3y xem c\xE1c m\u1EABu m\xE0 t\u1EA1o ra ch\u1EC9 s\u1ED1 n\xE0y:"),et=m(),o(_s.$$.fragment),pt=m(),o(Es.$$.fragment),rt=m(),ma=c("p"),Fp=h("Ch\xE0, c\xF3 r\u1EA5t nhi\u1EC1u th\u1EE9 \u1EDF \u0111\xE2y, nh\u01B0ng kh\xF4ng c\xF3 g\xEC n\u1ED5i b\u1EADt l\xE0 b\u1EA5t th\u01B0\u1EDDng. H\xE3y xem c\xE1c nh\xE3n:"),mt=m(),o(ws.$$.fragment),ut=m(),o(qs.$$.fragment),it=m(),nn=c("p"),Hp=h("Ah! C\xE1c m\u1EABu "),Dh=c("code"),Gp=h("nan"),Lp=h(" \u0111\u1EC1u c\xF3 c\xF9ng m\u1ED9t nh\xE3n, v\xE0 \u0111\xF3 l\xE0 nh\xE3n 2. \u0110\xE2y l\xE0 m\u1ED9t g\u1EE3i \xFD r\u1EA5t m\u1EA1nh m\u1EBD. Th\u1EF1c t\u1EBF l\xE0 ch\xFAng ta ch\u1EC9 b\u1ECB m\u1EA5t "),Oh=c("code"),Up=h("nan"),Rp=h(" khi nh\xE3n c\u1EE7a ch\xFAng ta l\xE0 2 cho th\u1EA5y r\u1EB1ng \u0111\xE2y l\xE0 th\u1EDDi \u0111i\u1EC3m r\u1EA5t t\u1ED1t \u0111\u1EC3 ki\u1EC3m tra s\u1ED1 l\u01B0\u1EE3ng nh\xE3n trong m\xF4 h\xECnh c\u1EE7a m\xECnh:"),bt=m(),o(Cs.$$.fragment),ot=m(),o(Ts.$$.fragment),gt=m(),Bn=c("p"),Ip=h("B\xE2y gi\u1EDD ch\xFAng ta th\u1EA5y v\u1EA5n \u0111\u1EC1: m\xF4 h\xECnh cho r\u1EB1ng ch\u1EC9 c\xF3 hai l\u1EDBp, nh\u01B0ng c\xE1c nh\xE3n t\u0103ng l\xEAn 2, c\xF3 ngh\u0129a l\xE0 th\u1EF1c t\u1EBF c\xF3 ba l\u1EDBp (v\xEC 0 c\u0169ng l\xE0 m\u1ED9t l\u1EDBp). \u0110\xE2y l\xE0 c\xE1ch ch\xFAng ta c\xF3 m\u1ED9t "),Bh=c("code"),Xp=h("nan"),Jp=h(" - b\u1EB1ng c\xE1ch c\u1ED1 g\u1EAFng t\xEDnh to\xE1n m\u1EA5t m\xE1t cho m\u1ED9t l\u1EDBp kh\xF4ng t\u1ED3n t\u1EA1i! H\xE3y th\u1EED thay \u0111\u1ED5i \u0111i\u1EC1u \u0111\xF3 v\xE0 l\u1EAFp l\u1EA1i m\xF4 h\xECnh:"),jt=m(),o(xs.$$.fragment),ft=m(),o(Ps.$$.fragment),vt=m(),Sn=c("p"),Wp=h("Ch\xFAng ta \u0111ang hu\u1EA5n luy\u1EC7n! Kh\xF4ng c\xF2n "),Sh=c("code"),Yp=h("nan"),Zp=h(" n\u1EEFa, v\xE0 m\u1EA5t m\xE1t c\u1EE7a ch\xFAng ta \u0111ang gi\u1EA3m d\u1EA7n \u2026 \u0111\u1EA1i lo\u1EA1i v\u1EADy. N\u1EBFu b\u1EA1n quan s\xE1t n\xF3 m\u1ED9t l\xFAc, b\u1EA1n c\xF3 th\u1EC3 b\u1EAFt \u0111\u1EA7u h\u01A1i m\u1EA5t ki\xEAn nh\u1EABn, b\u1EDFi v\xEC gi\xE1 tr\u1ECB t\u1ED5n th\u1EA5t v\u1EABn \u1EDF m\u1EE9c cao. Ch\xFAng ta h\xE3y d\u1EEBng hu\u1EA5n luy\u1EC7n \u1EDF \u0111\xE2y v\xE0 th\u1EED ngh\u0129 xem \u0111i\u1EC1u g\xEC c\xF3 th\u1EC3 g\xE2y ra v\u1EA5n \u0111\u1EC1 n\xE0y. T\u1EA1i th\u1EDDi \u0111i\u1EC3m n\xE0y, ch\xFAng ta kh\xE1 ch\u1EAFc ch\u1EAFn r\u1EB1ng c\u1EA3 d\u1EEF li\u1EC7u v\xE0 m\xF4 h\xECnh \u0111\u1EC1u \u1ED5n, nh\u01B0ng m\xF4 h\xECnh c\u1EE7a ch\xFAng ta kh\xF4ng ho\u1EA1t \u0111\u1ED9ng t\u1ED1t. C\xF2n l\u1EA1i g\xEC n\u1EEFa? \u0110\u1EBFn l\xFAc \u0111\u1EC3\u2026"),yt=m(),on=c("h3"),Kn=c("a"),Kh=c("span"),o(Ns.$$.fragment),Qp=m(),zh=c("span"),nr=h("Ki\u1EC3m tra si\xEAu tham s\u1ED1 c\u1EE7a b\u1EA1n"),dt=m(),sn=c("p"),sr=h("N\u1EBFu b\u1EA1n nh\xECn l\u1EA1i \u0111o\u1EA1n m\xE3 \u1EDF tr\xEAn, b\u1EA1n c\xF3 th\u1EC3 kh\xF4ng nh\xECn th\u1EA5y b\u1EA5t k\u1EF3 si\xEAu tham s\u1ED1 n\xE0o, c\xF3 l\u1EBD ngo\u1EA1i tr\u1EEB "),Mh=c("code"),ar=h("batch_size"),hr=h(", v\xE0 \u0111i\u1EC1u \u0111\xF3 d\u01B0\u1EDDng nh\u01B0 kh\xF4ng ph\u1EA3i l\xE0 th\u1EE7 ph\u1EA1m. Tuy nhi\xEAn, \u0111\u1EEBng \u0111\u1EC3 b\u1ECB l\u1EEBa; lu\xF4n c\xF3 si\xEAu tham s\u1ED1 v\xE0 n\u1EBFu b\u1EA1n kh\xF4ng th\u1EC3 nh\xECn th\u1EA5y ch\xFAng, \u0111i\u1EC1u \u0111\xF3 c\xF3 ngh\u0129a l\xE0 b\u1EA1n kh\xF4ng bi\u1EBFt ch\xFAng \u0111\u01B0\u1EE3c \u0111\u1EB7t th\xE0nh g\xEC. \u0110\u1EB7c bi\u1EC7t, h\xE3y nh\u1EDB m\u1ED9t \u0111i\u1EC1u quan tr\u1ECDng v\u1EC1 Keras: n\u1EBFu b\u1EA1n \u0111\u1EB7t h\xE0m m\u1EA5t m\xE1t, tr\xECnh t\u1ED1i \u01B0u h\xF3a ho\u1EB7c k\xEDch ho\u1EA1t b\u1EB1ng m\u1ED9t chu\u1ED7i, "),Vh=c("em"),lr=h("t\u1EA5t c\u1EA3 c\xE1c \u0111\u1ED1i s\u1ED1 c\u1EE7a n\xF3 s\u1EBD \u0111\u01B0\u1EE3c \u0111\u1EB7t th\xE0nh gi\xE1 tr\u1ECB m\u1EB7c \u0111\u1ECBnh c\u1EE7a ch\xFAng"),tr=h(". \u0110i\u1EC1u n\xE0y c\xF3 ngh\u0129a l\xE0 m\u1EB7c d\xF9 vi\u1EC7c s\u1EED d\u1EE5ng chu\u1ED7i k\xFD t\u1EF1 r\u1EA5t ti\u1EC7n l\u1EE3i, nh\u01B0ng b\u1EA1n n\xEAn h\u1EBFt s\u1EE9c c\u1EA9n th\u1EADn khi l\xE0m nh\u01B0 v\u1EADy, v\xEC n\xF3 c\xF3 th\u1EC3 d\u1EC5 d\xE0ng che gi\u1EA5u nh\u1EEFng th\u1EE9 quan tr\u1ECDng v\u1EDBi b\u1EA1n. (B\u1EA5t k\u1EF3 ai \u0111ang th\u1EED th\xE1ch th\u1EE9c t\xF9y ch\u1ECDn \u1EDF tr\xEAn n\xEAn l\u01B0u \xFD c\u1EA9n th\u1EADn v\u1EC1 th\u1EF1c t\u1EBF n\xE0y.)"),kt=m(),zn=c("p"),cr=h("Trong tr\u01B0\u1EDDng h\u1EE3p n\xE0y, ch\xFAng ta \u0111\xE3 \u0111\u1EB7t tham s\u1ED1 b\u1EB1ng chu\u1ED7i \u1EDF \u0111\xE2u? Ban \u0111\u1EA7u, ch\xFAng ta \u0111\xE3 \u0111\u1EB7t gi\xE1 tr\u1ECB m\u1EA5t m\xE1t b\u1EB1ng m\u1ED9t chu\u1ED7i, nh\u01B0ng ch\xFAng ta kh\xF4ng l\xE0m \u0111i\u1EC1u \u0111\xF3 n\u1EEFa. Tuy nhi\xEAn, ch\xFAng ta \u0111ang thi\u1EBFt l\u1EADp tr\xECnh t\u1ED1i \u01B0u h\xF3a b\u1EB1ng m\u1ED9t chu\u1ED7i. \u0110i\u1EC1u \u0111\xF3 c\xF3 th\u1EC3 \u0111ang che gi\u1EA5u b\u1EA5t c\u1EE9 \u0111i\u1EC1u g\xEC v\u1EDBi m\xECnh? H\xE3y xem "),As=c("a"),er=h("c\xE1c tham s\u1ED1 c\u1EE7a n\xF3"),pr=h("."),$t=m(),an=c("p"),rr=h("C\xF3 g\xEC n\u1ED5i b\u1EADt \u1EDF \u0111\xE2y kh\xF4ng? \u0110\xFAng v\u1EADy - t\u1ED1c \u0111\u1ED9 h\u1ECDc! Khi ch\xFAng ta ch\u1EC9 s\u1EED d\u1EE5ng chu\u1ED7i "),Fh=c("code"),mr=h("'adam'"),ur=h(", ch\xFAng ta s\u1EBD nh\u1EADn \u0111\u01B0\u1EE3c t\u1ED1c \u0111\u1ED9 h\u1ECDc m\u1EB7c \u0111\u1ECBnh, l\xE0 0.001 ho\u1EB7c 1e-3. \u0110\xE2y l\xE0 m\u1EE9c qu\xE1 cao \u0111\u1ED1i v\u1EDBi m\u1ED9t m\xF4 h\xECnh Transformer! N\xF3i chung, ch\xFAng t\xF4i khuy\xEAn b\u1EA1n n\xEAn th\u1EED t\u1ED1c \u0111\u1ED9 h\u1ECDc t\u1EEB 1e-5 \u0111\u1EBFn 1e-4 cho c\xE1c m\xF4 h\xECnh c\u1EE7a b\u1EA1n; \u0111\xF3 l\xE0 m\u1ED9t n\u01A1i n\xE0o \u0111\xF3 nh\u1ECF h\u01A1n t\u1EEB 10X \u0111\u1EBFn 100X so v\u1EDBi gi\xE1 tr\u1ECB m\xE0 ta th\u1EF1c s\u1EF1 \u0111ang s\u1EED d\u1EE5ng \u1EDF \u0111\xE2y. \u0110i\u1EC1u \u0111\xF3 nghe c\xF3 v\u1EBB nh\u01B0 n\xF3 c\xF3 th\u1EC3 l\xE0 m\u1ED9t v\u1EA5n \u0111\u1EC1 l\u1EDBn, v\xEC v\u1EADy h\xE3y th\u1EED gi\u1EA3m b\u1EDBt n\xF3. \u0110\u1EC3 l\xE0m \u0111i\u1EC1u \u0111\xF3, ch\xFAng ta c\u1EA7n nh\u1EADp v\xE0o \u0111\u1ED1i t\u01B0\u1EE3ng "),Hh=c("code"),ir=h("optimizer"),br=h(". Trong khi ch\xFAng ta \u0111ang \u1EDF \u0111\xF3, h\xE3y b\u1EAFt \u0111\u1EA7u l\u1EA1i m\xF4 h\xECnh t\u1EEB checkpoint, trong tr\u01B0\u1EDDng h\u1EE3p hu\u1EA5n luy\u1EC7n v\u1EDBi t\u1ED1c \u0111\u1ED9 h\u1ECDc cao l\xE0m h\u1ECFng tr\u1ECDng s\u1ED1 c\u1EE7a n\xF3:"),_t=m(),o(Ds.$$.fragment),Et=m(),o(Mn.$$.fragment),wt=m(),ua=c("p"),or=h("B\xE2y gi\u1EDD, ch\xFAng t\xF4i c\xF3 th\u1EC3 th\u1EED \u0111i\u1EC1u ch\u1EC9nh m\xF4 h\xECnh v\u1EDBi t\u1ED1c \u0111\u1ED9 h\u1ECDc m\u1EDBi, \u0111\u01B0\u1EE3c c\u1EA3i thi\u1EC7n:"),qt=m(),o(Os.$$.fragment),Ct=m(),o(Bs.$$.fragment),Tt=m(),ia=c("p"),gr=h("B\xE2y gi\u1EDD m\u1EA5t m\xE1t c\u1EE7a ch\xFAng ta th\u1EF1c s\u1EF1 \u0111i \u0111\xE2u \u0111\xF3! Vi\u1EC7c hu\u1EA5n luy\u1EC7n cu\u1ED1i c\xF9ng c\xF3 v\u1EBB nh\u01B0 n\xF3 \u0111\xE3 ho\u1EA1t \u0111\u1ED9ng. C\xF3 m\u1ED9t b\xE0i h\u1ECDc \u1EDF \u0111\xE2y: khi m\xF4 h\xECnh c\u1EE7a b\u1EA1n \u0111ang ch\u1EA1y nh\u01B0ng m\u1EE9c hao h\u1EE5t kh\xF4ng gi\u1EA3m v\xE0 b\u1EA1n ch\u1EAFc ch\u1EAFn r\u1EB1ng d\u1EEF li\u1EC7u c\u1EE7a m\xECnh v\u1EABn \u1ED5n, b\u1EA1n n\xEAn ki\u1EC3m tra c\xE1c si\xEAu tham s\u1ED1 nh\u01B0 t\u1ED1c \u0111\u1ED9 h\u1ECDc v\xE0 gi\u1EA3m tr\u1ECDng l\u01B0\u1EE3ng. \u0110\u1EB7t m\u1ED9t trong hai gi\xE1 tr\u1ECB \u0111\xF3 qu\xE1 cao r\u1EA5t c\xF3 th\u1EC3 khi\u1EBFn qu\xE1 tr\xECnh hu\u1EA5n luy\u1EC7n b\u1ECB \u201C\u0111\xECnh tr\u1EC7\u201D v\u1EDBi gi\xE1 tr\u1ECB t\u1ED5n th\u1EA5t cao."),xt=m(),gn=c("h2"),Vn=c("a"),Gh=c("span"),o(Ss.$$.fragment),jr=m(),Lh=c("span"),fr=h("C\xE1c v\u1EA5n \u0111\u1EC1 ti\u1EC1m \u1EA9n kh\xE1c"),Pt=m(),ba=c("p"),vr=h("Ch\xFAng ta \u0111\xE3 \u0111\u1EC1 c\u1EADp \u0111\u1EBFn c\xE1c v\u1EA5n \u0111\u1EC1 trong t\u1EADp l\u1EC7nh \u1EDF tr\xEAn, nh\u01B0ng c\xF3 m\u1ED9t s\u1ED1 l\u1ED7i ph\u1ED5 bi\u1EBFn kh\xE1c m\xE0 b\u1EA1n c\xF3 th\u1EC3 g\u1EB7p ph\u1EA3i. Ch\xFAng ta h\xE3y nh\xECn v\xE0o m\u1ED9t danh s\xE1ch (kh\xF4ng \u0111\u1EA7y \u0111\u1EE7 cho l\u1EAFm)."),Nt=m(),jn=c("h3"),Fn=c("a"),Uh=c("span"),o(Ks.$$.fragment),yr=m(),Rh=c("span"),dr=h("X\u1EED l\xFD l\u1ED7i h\u1EBFt b\u1ED9 nh\u1EDB"),At=m(),hn=c("p"),kr=h("D\u1EA5u hi\u1EC7u cho bi\u1EBFt s\u1EAFp h\u1EBFt b\u1ED9 nh\u1EDB l\xE0 m\u1ED9t l\u1ED7i nh\u01B0 \u201COOM when allocating tensor\u201D  - OOM l\xE0 vi\u1EBFt t\u1EAFt c\u1EE7a \u201Ch\u1EBFt b\u1ED9 nh\u1EDB.\u201D \u0110\xE2y l\xE0 m\u1ED9t nguy c\u01A1 r\u1EA5t ph\u1ED5 bi\u1EBFn khi x\u1EED l\xFD c\xE1c m\xF4 h\xECnh ng\xF4n ng\u1EEF l\u1EDBn. N\u1EBFu b\u1EA1n g\u1EB7p ph\u1EA3i \u0111i\u1EC1u n\xE0y, m\u1ED9t chi\u1EBFn l\u01B0\u1EE3c t\u1ED1t l\xE0 gi\u1EA3m m\u1ED9t n\u1EEDa k\xEDch th\u01B0\u1EDBc l\xF4 c\u1EE7a b\u1EA1n v\xE0 th\u1EED l\u1EA1i. Tuy nhi\xEAn, h\xE3y nh\u1EDB r\u1EB1ng m\u1ED9t s\u1ED1 m\xF4 h\xECnh c\xF3 k\xEDch th\u01B0\u1EDBc "),Ih=c("em"),$r=h("r\u1EA5t"),_r=h(" l\u1EDBn. V\xED d\u1EE5: GPT-2 k\xEDch th\u01B0\u1EDBc \u0111\u1EA7y \u0111\u1EE7 c\xF3 th\xF4ng s\u1ED1 1.5B, c\xF3 ngh\u0129a l\xE0 b\u1EA1n s\u1EBD c\u1EA7n 6GB b\u1ED9 nh\u1EDB ch\u1EC9 \u0111\u1EC3 l\u01B0u m\xF4 h\xECnh v\xE0 6GB kh\xE1c cho \u0111\u1ED9 d\u1ED1c c\u1EE7a n\xF3! Hu\u1EA5n luy\u1EC7n m\xF4 h\xECnh GPT-2 \u0111\u1EA7y \u0111\u1EE7 th\u01B0\u1EDDng s\u1EBD y\xEAu c\u1EA7u h\u01A1n 20GB VRAM b\u1EA5t k\u1EC3 b\u1EA1n s\u1EED d\u1EE5ng k\xEDch th\u01B0\u1EDBc l\xF4 n\xE0o, \u0111i\u1EC1u m\xE0 ch\u1EC9 m\u1ED9t s\u1ED1 GPU c\xF3. C\xE1c m\xF4 h\xECnh nh\u1EB9 h\u01A1n nh\u01B0 "),Xh=c("code"),Er=h("distilbert-base-cased"),wr=h("  d\u1EC5 ch\u1EA1y h\u01A1n nhi\u1EC1u v\xE0 hu\u1EA5n luy\u1EC7n c\u0169ng nhanh h\u01A1n nhi\u1EC1u."),Dt=m(),o(Hn.$$.fragment),Ot=m(),fn=c("h3"),Gn=c("a"),Jh=c("span"),o(zs.$$.fragment),qr=m(),Wh=c("span"),Cr=h("TensorFlow \u0111\xF3i r\u1ED3i \u0111\xF3i r\u1ED3i\u{1F99B}"),Bt=m(),ln=c("p"),Tr=h("M\u1ED9t \u0111i\u1EC3m \u0111\u1EB7c bi\u1EC7t c\u1EE7a TensorFlow m\xE0 b\u1EA1n n\xEAn bi\u1EBFt l\xE0 n\xF3 ph\xE2n b\u1ED5 "),Yh=c("em"),xr=h("t\u1EA5t c\u1EA3"),Pr=h(" b\u1ED9 nh\u1EDB GPU c\u1EE7a b\u1EA1n cho ch\xEDnh n\xF3 ngay khi b\u1EA1n t\u1EA3i m\u1ED9t m\xF4 h\xECnh ho\u1EB7c th\u1EF1c hi\u1EC7n b\u1EA5t k\u1EF3 hu\u1EA5n luy\u1EC7n n\xE0o v\xE0 sau \u0111\xF3 n\xF3 s\u1EBD ph\xE2n chia b\u1ED9 nh\u1EDB \u0111\xF3 theo y\xEAu c\u1EA7u. \u0110i\u1EC1u n\xE0y kh\xE1c v\u1EDBi h\xE0nh vi c\u1EE7a c\xE1c khung kh\xE1c, nh\u01B0 PyTorch, ph\xE2n b\u1ED5 b\u1ED9 nh\u1EDB theo y\xEAu c\u1EA7u v\u1EDBi CUDA thay v\xEC th\u1EF1c hi\u1EC7n n\xF3 trong n\u1ED9i b\u1ED9. M\u1ED9t \u01B0u \u0111i\u1EC3m c\u1EE7a ph\u01B0\u01A1ng ph\xE1p TensorFlow l\xE0 n\xF3 th\u01B0\u1EDDng c\xF3 th\u1EC3 \u0111\u01B0a ra c\xE1c l\u1ED7i h\u1EEFu \xEDch khi b\u1EA1n h\u1EBFt b\u1ED9 nh\u1EDB v\xE0 n\xF3 c\xF3 th\u1EC3 ph\u1EE5c h\u1ED3i t\u1EEB tr\u1EA1ng th\xE1i \u0111\xF3 m\xE0 kh\xF4ng l\xE0m h\u1ECFng to\xE0n b\u1ED9 nh\xE2n CUDA. Nh\u01B0ng c\u0169ng c\xF3 m\u1ED9t nh\u01B0\u1EE3c \u0111i\u1EC3m quan tr\u1ECDng: n\u1EBFu b\u1EA1n ch\u1EA1y hai ti\u1EBFn tr\xECnh TensorFlow c\xF9ng m\u1ED9t l\xFAc, th\xEC "),Zh=c("strong"),Nr=h("b\u1EA1n s\u1EBD c\xF3 m\u1ED9t kho\u1EA3ng th\u1EDDi gian t\u1ED3i t\u1EC7"),Ar=h("."),St=m(),oa=c("p"),Dr=h("N\u1EBFu b\u1EA1n \u0111ang ch\u1EA1y tr\xEAn Colab, b\u1EA1n kh\xF4ng c\u1EA7n ph\u1EA3i lo l\u1EAFng v\u1EC1 \u0111i\u1EC1u n\xE0y, nh\u01B0ng n\u1EBFu b\u1EA1n \u0111ang ch\u1EA1y c\u1EE5c b\u1ED9 th\xEC \u0111\xE2y ch\u1EAFc ch\u1EAFn l\xE0 \u0111i\u1EC1u b\u1EA1n n\xEAn c\u1EA9n th\u1EADn. \u0110\u1EB7c bi\u1EC7t, h\xE3y l\u01B0u \xFD r\u1EB1ng vi\u1EC7c \u0111\xF3ng m\u1ED9t tab s\u1ED5 ghi ch\xE9p kh\xF4ng nh\u1EA5t thi\u1EBFt ph\u1EA3i \u0111\xF3ng notebook \u0111\xF3 l\u1EA1i! B\u1EA1n c\xF3 th\u1EC3 c\u1EA7n ch\u1ECDn notebok \u0111ang ch\u1EA1y (notebook c\xF3 bi\u1EC3u t\u01B0\u1EE3ng m\xE0u xanh l\xE1 c\xE2y) v\xE0 t\u1EAFt ch\xFAng theo c\xE1ch th\u1EE7 c\xF4ng trong danh s\xE1ch th\u01B0 m\u1EE5c. B\u1EA5t k\u1EF3 notebook \u0111ang ch\u1EA1y n\xE0o \u0111ang s\u1EED d\u1EE5ng TensorFlow v\u1EABn c\xF3 th\u1EC3 \u0111ang gi\u1EEF m\u1ED9t lo\u1EA1t b\u1ED9 nh\u1EDB GPU c\u1EE7a b\u1EA1n v\xE0 \u0111i\u1EC1u \u0111\xF3 c\xF3 ngh\u0129a l\xE0 b\u1EA5t k\u1EF3 notebook m\u1EDBi n\xE0o b\u1EA1n b\u1EAFt \u0111\u1EA7u \u0111\u1EC1u c\xF3 th\u1EC3 g\u1EB7p ph\u1EA3i m\u1ED9t s\u1ED1 v\u1EA5n \u0111\u1EC1 r\u1EA5t k\u1EF3 qu\u1EB7c."),Kt=m(),Ln=c("p"),Or=h("N\u1EBFu b\u1EA1n b\u1EAFt \u0111\u1EA7u g\u1EB7p l\u1ED7i v\u1EC1 CUDA, BLAS ho\u1EB7c cuBLAS trong m\xE3 ho\u1EA1t \u0111\u1ED9ng tr\u01B0\u1EDBc \u0111\xF3, \u0111\xE2y r\u1EA5t th\u01B0\u1EDDng l\xE0 th\u1EE7 ph\u1EA1m. B\u1EA1n c\xF3 th\u1EC3 s\u1EED d\u1EE5ng m\u1ED9t l\u1EC7nh nh\u01B0 "),Qh=c("code"),Br=h("nvidia-smi"),Sr=h(" \u0111\u1EC3 ki\u1EC3m tra - khi b\u1EA1n t\u1EAFt ho\u1EB7c kh\u1EDFi \u0111\u1ED9ng l\u1EA1i notebook hi\u1EC7n t\u1EA1i c\u1EE7a m\xECnh, b\u1ED9 nh\u1EDB c\u1EE7a b\u1EA1n c\xF2n tr\u1ED1ng hay v\u1EABn c\xF2n s\u1EED d\u1EE5ng \u0111\u01B0\u1EE3c? N\u1EBFu n\xF3 v\u1EABn c\xF2n \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng, m\u1ED9t c\xE1i g\xEC \u0111\xF3 kh\xE1c \u0111ang gi\u1EEF n\xF3!"),zt=m(),vn=c("h3"),Un=c("a"),nl=c("span"),o(Ms.$$.fragment),Kr=m(),sl=c("span"),zr=h("Ki\u1EC3m tra l\u1EA1i d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n (m\u1ED9t l\u1EA7n n\u1EEFa!)"),Mt=m(),O=c("p"),Mr=h("M\xF4 h\xECnh c\u1EE7a b\u1EA1n s\u1EBD ch\u1EC9 h\u1ECDc \u0111\u01B0\u1EE3c \u0111i\u1EC1u g\xEC \u0111\xF3 n\u1EBFu n\xF3 th\u1EF1c s\u1EF1 c\xF3 th\u1EC3 h\u1ECDc \u0111\u01B0\u1EE3c b\u1EA5t c\u1EE9 \u0111i\u1EC1u g\xEC t\u1EEB d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n. N\u1EBFu c\xF3 l\u1ED7i l\xE0m h\u1ECFng d\u1EEF li\u1EC7u ho\u1EB7c c\xE1c nh\xE3n \u0111\u01B0\u1EE3c g\xE1n ng\u1EABu nhi\xEAn, r\u1EA5t c\xF3 th\u1EC3 b\u1EA1n s\u1EBD kh\xF4ng hu\u1EA5n luy\u1EC7n \u0111\u01B0\u1EE3c m\xF4 h\xECnh n\xE0o v\u1EC1 t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a m\xECnh. M\u1ED9t c\xF4ng c\u1EE5 h\u1EEFu \xEDch \u1EDF \u0111\xE2y l\xE0 "),al=c("code"),Vr=h("tokenizer.decode()"),Fr=h(". Thao t\xE1c n\xE0y s\u1EBD bi\u1EBFn "),hl=c("code"),Hr=h("input_ids"),Gr=h(" tr\u1EDF l\u1EA1i th\xE0nh chu\u1ED7i, v\xEC v\u1EADy b\u1EA1n c\xF3 th\u1EC3 xem d\u1EEF li\u1EC7u v\xE0 xem li\u1EC7u d\u1EEF li\u1EC7u hu\u1EA5n luy\u1EC7n c\u1EE7a b\u1EA1n c\xF3 \u0111ang d\u1EA1y nh\u1EEFng g\xEC b\u1EA1n mu\u1ED1n n\xF3 d\u1EA1y hay kh\xF4ng. V\xED d\u1EE5: sau khi b\u1EA1n nh\u1EADn \u0111\u01B0\u1EE3c m\u1ED9t "),ll=c("code"),Lr=h("batch"),Ur=h(" t\u1EEB "),tl=c("code"),Rr=h("tf.data.Dataset"),Ir=h(" nh\u01B0 ch\xFAng ta \u0111\xE3 l\xE0m \u1EDF tr\xEAn, b\u1EA1n c\xF3 th\u1EC3 gi\u1EA3i m\xE3 ph\u1EA7n t\u1EED \u0111\u1EA7u ti\xEAn nh\u01B0 sau:"),Vt=m(),o(Vs.$$.fragment),Ft=m(),ga=c("p"),Xr=h("Then you can compare it with the first label, like so:"),Ht=m(),o(Fs.$$.fragment),Gt=m(),ja=c("p"),Jr=h("Khi b\u1EA1n c\xF3 th\u1EC3 xem d\u1EEF li\u1EC7u c\u1EE7a m\xECnh nh\u01B0 th\u1EBF n\xE0y, b\u1EA1n c\xF3 th\u1EC3 t\u1EF1 h\u1ECFi b\u1EA3n th\xE2n nh\u1EEFng c\xE2u h\u1ECFi sau:"),Lt=m(),V=c("ul"),cl=c("li"),Wr=h("D\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c gi\u1EA3i m\xE3 c\xF3 d\u1EC5 hi\u1EC3u kh\xF4ng?"),Yr=m(),el=c("li"),Zr=h("B\u1EA1n c\xF3 \u0111\u1ED3ng \xFD v\u1EDBi c\xE1c nh\xE3n?"),Qr=m(),pl=c("li"),nm=h("C\xF3 m\u1ED9t nh\xE3n n\xE0o ph\u1ED5 bi\u1EBFn h\u01A1n nh\u1EEFng nh\xE3n kh\xE1c kh\xF4ng?"),sm=m(),rl=c("li"),am=h("M\u1EA5t m\xE1t/Ch\u1EC9 s\u1ED1 s\u1EBD l\xE0 bao nhi\xEAu n\u1EBFu m\xF4 h\xECnh d\u1EF1 \u0111o\xE1n m\u1ED9t c\xE2u tr\u1EA3 l\u1EDDi ng\u1EABu nhi\xEAn/lu\xF4n l\xE0 m\u1ED9t c\xE2u tr\u1EA3 l\u1EDDi gi\u1ED1ng nhau?"),Ut=m(),fa=c("p"),hm=h("Sau khi xem x\xE9t d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n, h\xE3y xem qua m\u1ED9t s\u1ED1 d\u1EF1 \u0111o\xE1n c\u1EE7a m\xF4 h\xECnh - n\u1EBFu m\xF4 h\xECnh c\u1EE7a b\u1EA1n xu\u1EA5t ra c\xE1c token, h\xE3y th\u1EED gi\u1EA3i m\xE3 ch\xFAng! N\u1EBFu m\xF4 h\xECnh lu\xF4n d\u1EF1 \u0111o\xE1n c\xF9ng m\u1ED9t \u0111i\u1EC1u th\xEC \u0111\xF3 c\xF3 th\u1EC3 l\xE0 do t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n thi\xEAn v\u1EC1 m\u1ED9t lo\u1EA1i (\u0111\u1ED1i v\u1EDBi c\xE1c v\u1EA5n \u0111\u1EC1 ph\xE2n lo\u1EA1i), v\xEC v\u1EADy c\xE1c k\u1EF9 thu\u1EADt nh\u01B0 l\u1EA5y m\u1EABu qu\xE1 m\u1EE9c c\xE1c l\u1EDBp hi\u1EBFm c\xF3 th\u1EC3 h\u1EEFu \xEDch. Ngo\xE0i ra, \u0111i\u1EC1u n\xE0y c\u0169ng c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c g\xE2y ra b\u1EDFi c\xE1c v\u1EA5n \u0111\u1EC1 hu\u1EA5n luy\u1EC7n nh\u01B0 c\xE0i \u0111\u1EB7t si\xEAu tham s\u1ED1 t\u1EC7."),Rt=m(),va=c("p"),lm=h("N\u1EBFu ph\u1EA7n m\u1EA5t m\xE1t/ c\xE1c ch\u1EC9 s\u1ED1 b\u1EA1n nh\u1EADn \u0111\u01B0\u1EE3c tr\xEAn m\xF4 h\xECnh ban \u0111\u1EA7u c\u1EE7a m\xECnh tr\u01B0\u1EDBc khi hu\u1EA5n luy\u1EC7n r\u1EA5t kh\xE1c v\u1EDBi c\xE1i b\u1EA1n mong \u0111\u1EE3i cho c\xE1c d\u1EF1 \u0111o\xE1n ng\u1EABu nhi\xEAn, h\xE3y ki\u1EC3m tra k\u1EF9 c\xE1ch t\xEDnh to\xE1n m\u1EA5t m\xE1t ho\u1EB7c ch\u1EC9 s\u1ED1 c\u1EE7a b\u1EA1n, v\xEC c\xF3 th\u1EC3 c\xF3 m\u1ED9t l\u1ED7i \u1EDF \u0111\xF3. N\u1EBFu b\u1EA1n \u0111ang s\u1EED d\u1EE5ng m\u1ED9t s\u1ED1 kho\u1EA3ng m\u1EA5t m\xE1t m\xE0 b\u1EA1n th\xEAm v\xE0o cu\u1ED1i, h\xE3y \u0111\u1EA3m b\u1EA3o r\u1EB1ng ch\xFAng c\xF3 c\xF9ng quy m\xF4."),It=m(),ya=c("p"),tm=h("Khi b\u1EA1n ch\u1EAFc ch\u1EAFn d\u1EEF li\u1EC7u c\u1EE7a m\xECnh l\xE0 ho\xE0n h\u1EA3o, b\u1EA1n c\xF3 th\u1EC3 xem li\u1EC7u m\xF4 h\xECnh c\xF3 kh\u1EA3 n\u0103ng hu\u1EA5n luy\u1EC7n v\u1EC1 n\xF3 hay kh\xF4ng b\u1EB1ng m\u1ED9t b\xE0i ki\u1EC3m tra \u0111\u01A1n gi\u1EA3n."),Xt=m(),yn=c("h3"),Rn=c("a"),ml=c("span"),o(Hs.$$.fragment),cm=m(),ul=c("span"),em=h("H\u1ECDc k\u0129 m\xF4 h\xECnh c\u1EE7a b\u1EA1n trong m\u1ED9t l\xF4"),Jt=m(),da=c("p"),pm=h("Vi\u1EC7c h\u1ECDc qu\xE1 nhi\u1EC1u th\u01B0\u1EDDng l\xE0 \u0111i\u1EC1u ch\xFAng ta c\u1ED1 g\u1EAFng tr\xE1nh khi hu\u1EA5n luy\u1EC7n, v\xEC n\xF3 c\xF3 ngh\u0129a l\xE0 m\xF4 h\xECnh kh\xF4ng h\u1ECDc c\xE1ch nh\u1EADn ra c\xE1c \u0111\u1EB7c \u0111i\u1EC3m chung ta mu\u1ED1n m\xE0 thay v\xE0o \u0111\xF3 ch\u1EC9 l\xE0 ghi nh\u1EDB c\xE1c m\u1EABu hu\u1EA5n luy\u1EC7n. Tuy nhi\xEAn, c\u1ED1 g\u1EAFng hu\u1EA5n luy\u1EC7n m\xF4 h\xECnh c\u1EE7a b\u1EA1n l\u1EB7p \u0111i l\u1EB7p l\u1EA1i l\xE0 m\u1ED9t b\xE0i ki\u1EC3m tra t\u1ED1t \u0111\u1EC3 ki\u1EC3m tra xem v\u1EA5n \u0111\u1EC1 nh\u01B0 b\u1EA1n \u0111\xE3 \u0111\u1ECBnh h\xECnh c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c gi\u1EA3i quy\u1EBFt b\u1EB1ng m\xF4 h\xECnh m\xE0 b\u1EA1n \u0111ang c\u1ED1 g\u1EAFng hu\u1EA5n luy\u1EC7n hay kh\xF4ng. N\xF3 c\u0169ng s\u1EBD gi\xFAp b\u1EA1n xem li\u1EC7u t\u1ED1c \u0111\u1ED9 h\u1ECDc ban \u0111\u1EA7u c\u1EE7a b\u1EA1n c\xF3 qu\xE1 cao hay kh\xF4ng."),Wt=m(),tn=c("p"),rm=h("Th\u1EF1c hi\u1EC7n \u0111i\u1EC1u n\xE0y khi b\u1EA1n \u0111\xE3 x\xE1c \u0111\u1ECBnh \u0111\u01B0\u1EE3c "),il=c("code"),mm=h("model"),um=h(" c\u1EE7a m\xECnh th\u1EF1c s\u1EF1 d\u1EC5 d\xE0ng; ch\u1EC9 c\u1EA7n l\u1EA5y m\u1ED9t lo\u1EA1t d\u1EEF li\u1EC7u hu\u1EA5n luy\u1EC7n, sau \u0111\xF3 coi "),bl=c("code"),im=h("batch"),bm=h(" \u0111\xF3 l\xE0 to\xE0n b\u1ED9 t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n, \u0111\u01B0a n\xF3 v\xE0o m\xF4 h\xECnh v\u1EDBi m\u1ED9t l\u01B0\u1EE3ng epoch l\u1EDBn:"),Yt=m(),o(Gs.$$.fragment),Zt=m(),o(In.$$.fragment),Qt=m(),Xn=c("p"),om=h("M\xF4 h\xECnh ph\u1EA3i c\xF3 k\u1EBFt qu\u1EA3 g\u1EA7n nh\u01B0 ho\xE0n h\u1EA3o tr\xEAn "),ol=c("code"),gm=h("batch"),jm=h(", v\u1EDBi m\u1EE9c m\u1EA5t m\xE1t gi\u1EA3m nhanh v\u1EC1 0 (ho\u1EB7c gi\xE1 tr\u1ECB t\u1ED1i thi\u1EC3u cho kho\u1EA3n m\u1EA5t m\xE1t b\u1EA1n \u0111ang s\u1EED d\u1EE5ng)."),nc=m(),ka=c("p"),fm=h("N\u1EBFu b\u1EA1n kh\xF4ng qu\u1EA3n l\xFD \u0111\u1EC3 m\xF4 h\xECnh c\u1EE7a m\xECnh c\xF3 \u0111\u01B0\u1EE3c k\u1EBFt qu\u1EA3 ho\xE0n h\u1EA3o nh\u01B0 th\u1EBF n\xE0y, \u0111i\u1EC1u \u0111\xF3 c\xF3 ngh\u0129a l\xE0 c\xF3 \u0111i\u1EC1u g\xEC \u0111\xF3 kh\xF4ng \u1ED5n trong c\xE1ch b\u1EA1n \u0111\u1ECBnh khung v\u1EA5n \u0111\u1EC1 ho\u1EB7c d\u1EEF li\u1EC7u c\u1EE7a m\xECnh, v\xEC v\u1EADy b\u1EA1n n\xEAn kh\u1EAFc ph\u1EE5c \u0111i\u1EC1u \u0111\xF3. Ch\u1EC9 khi b\u1EA1n v\u01B0\u1EE3t qua \u0111\u01B0\u1EE3c b\xE0i ki\u1EC3m tra overfit, b\u1EA1n m\u1EDBi c\xF3 th\u1EC3 ch\u1EAFc ch\u1EAFn r\u1EB1ng m\xF4 h\xECnh c\u1EE7a m\xECnh th\u1EF1c s\u1EF1 c\xF3 th\u1EC3 h\u1ECDc \u0111\u01B0\u1EE3c \u0111i\u1EC1u g\xEC \u0111\xF3."),sc=m(),o(Jn.$$.fragment),ac=m(),dn=c("h3"),Wn=c("a"),gl=c("span"),o(Ls.$$.fragment),vm=m(),jl=c("span"),ym=h("Kh\xF4ng \u0111i\u1EC1u ch\u1EC9nh b\u1EA5t c\u1EE9 th\u1EE9 g\xEC cho \u0111\u1EBFn khi b\u1EA1n c\xF3 m\xF4 h\xECnh c\u01A1 s\u1EDF \u0111\u1EA7u ti\xEAn"),hc=m(),Yn=c("p"),dm=h("\u0110i\u1EC1u ch\u1EC9nh si\xEAu tham s\u1ED1 lu\xF4n \u0111\u01B0\u1EE3c nh\u1EA5n m\u1EA1nh l\xE0 ph\u1EA7n kh\xF3 nh\u1EA5t c\u1EE7a h\u1ECDc m\xE1y, nh\u01B0ng n\xF3 ch\u1EC9 l\xE0 b\u01B0\u1EDBc cu\u1ED1i c\xF9ng gi\xFAp b\u1EA1n hi\u1EC3u \u0111\u01B0\u1EE3c m\u1ED9t ch\xFAt v\u1EC1 ch\u1EC9 s\u1ED1 n\xE0y. "),fl=c("em"),km=h("C\xE1c gi\xE1 tr\u1ECB r\u1EA5t kh\xF4ng t\u1ED1t"),$m=h(" cho c\xE1c si\xEAu tham s\u1ED1 c\u1EE7a b\u1EA1n, ch\u1EB3ng h\u1EA1n nh\u01B0 s\u1EED d\u1EE5ng t\u1ED1c \u0111\u1ED9 h\u1ECDc Adam m\u1EB7c \u0111\u1ECBnh l\xE0 1e-3 v\u1EDBi m\xF4 h\xECnh Transformer, t\u1EA5t nhi\xEAn s\u1EBD khi\u1EBFn vi\u1EC7c h\u1ECDc ti\u1EBFn h\xE0nh r\u1EA5t ch\u1EADm ho\u1EB7c ho\xE0n to\xE0n b\u1ECB \u0111\xECnh tr\u1EC7, nh\u01B0ng h\u1EA7u h\u1EBFt th\u1EDDi gian l\xE0 c\xE1c si\xEAu tham s\u1ED1 \u201Ch\u1EE3p l\xFD\u201D, nh\u01B0 t\u1ED1c \u0111\u1ED9 h\u1ECDc t\u1EEB 1e-5 \u0111\u1EBFn 5e-5, s\u1EBD ho\u1EA1t \u0111\u1ED9ng t\u1ED1t \u0111\u1EC3 mang l\u1EA1i cho b\u1EA1n k\u1EBFt qu\u1EA3 t\u1ED1t. V\xEC v\u1EADy \u0111\u1EEBng kh\u1EDFi ch\u1EA1y t\xECm ki\u1EBFm si\xEAu tham s\u1ED1 t\u1ED1n th\u1EDDi gian v\xE0 t\u1ED1n k\xE9m cho \u0111\u1EBFn khi b\u1EA1n c\xF3 th\u1EE9 g\xEC \u0111\xF3 v\u01B0\u1EE3t qua m\xF4 h\xECnh c\u01A1 s\u1EDF m\xE0 b\u1EA1n c\xF3 tr\xEAn t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a m\xECnh."),lc=m(),$a=c("p"),_m=h("Khi b\u1EA1n \u0111\xE3 c\xF3 m\u1ED9t m\xF4 h\xECnh \u0111\u1EE7 t\u1ED1t, b\u1EA1n c\xF3 th\u1EC3 b\u1EAFt \u0111\u1EA7u \u0111i\u1EC1u ch\u1EC9nh m\u1ED9t ch\xFAt. \u0110\u1EEBng th\u1EED kh\u1EDFi ch\u1EA1y m\u1ED9t ngh\xECn l\u1EA7n ch\u1EA1y v\u1EDBi c\xE1c si\xEAu tham s\u1ED1 kh\xE1c nhau, nh\u01B0ng h\xE3y so s\xE1nh m\u1ED9t v\xE0i l\u1EA7n ch\u1EA1y v\u1EDBi c\xE1c gi\xE1 tr\u1ECB kh\xE1c nhau cho m\u1ED9t si\xEAu th\xF4ng s\u1ED1 \u0111\u1EC3 c\xF3 \u0111\u01B0\u1EE3c \xFD t\u01B0\u1EDFng v\u1EC1 gi\xE1 tr\u1ECB n\xE0o c\xF3 t\xE1c \u0111\u1ED9ng l\u1EDBn nh\u1EA5t."),tc=m(),_a=c("p"),Em=h("N\u1EBFu b\u1EA1n \u0111ang \u0111i\u1EC1u ch\u1EC9nh ch\xEDnh m\xF4 h\xECnh, h\xE3y gi\u1EEF n\xF3 \u0111\u01A1n gi\u1EA3n v\xE0 \u0111\u1EEBng th\u1EED b\u1EA5t c\u1EE9 \u0111i\u1EC1u g\xEC m\xE0 b\u1EA1n kh\xF4ng th\u1EC3 bi\u1EC7n minh m\u1ED9t c\xE1ch h\u1EE3p l\xFD. Lu\xF4n \u0111\u1EA3m b\u1EA3o r\u1EB1ng b\u1EA1n quay l\u1EA1i ki\u1EC3m tra overfit \u0111\u1EC3 x\xE1c minh r\u1EB1ng thay \u0111\u1ED5i c\u1EE7a b\u1EA1n kh\xF4ng g\xE2y ra b\u1EA5t k\u1EF3 h\u1EADu qu\u1EA3 ngo\xE0i \xFD mu\u1ED1n n\xE0o."),cc=m(),kn=c("h3"),Zn=c("a"),vl=c("span"),o(Us.$$.fragment),wm=m(),yl=c("span"),qm=h("Y\xEAu c\u1EA7u gi\xFAp \u0111\u1EE1"),ec=m(),Qn=c("p"),Cm=h("Hy v\u1ECDng r\u1EB1ng b\u1EA1n s\u1EBD t\xECm th\u1EA5y m\u1ED9t s\u1ED1 l\u1EDDi khuy\xEAn trong ph\u1EA7n n\xE0y \u0111\u1EC3 gi\xFAp b\u1EA1n gi\u1EA3i quy\u1EBFt v\u1EA5n \u0111\u1EC1 c\u1EE7a m\xECnh, nh\u01B0ng n\u1EBFu kh\xF4ng ph\u1EA3i v\u1EADy, h\xE3y nh\u1EDB r\u1EB1ng b\u1EA1n lu\xF4n c\xF3 th\u1EC3 h\u1ECFi c\u1ED9ng \u0111\u1ED3ng tr\xEAn "),Rs=c("a"),Tm=h("di\u1EC5n \u0111\xE0n"),xm=h("."),pc=m(),Ea=c("p"),Pm=h("D\u01B0\u1EDBi \u0111\xE2y l\xE0 m\u1ED9t s\u1ED1 t\xE0i li\u1EC7u b\u1ED5 sung c\xF3 th\u1EC3 h\u1EEFu \xEDch:"),rc=m(),F=c("ul"),wa=c("li"),Is=c("a"),Nm=h("\u201CReproducibility as a vehicle for engineering best practices\u201D"),Am=h(" b\u1EDFi Joel Grus"),Dm=m(),qa=c("li"),Xs=c("a"),Om=h("\u201CChecklist for debugging neural networks\u201D"),Bm=h(" b\u1EDFi Cecelia Shao"),Sm=m(),Ca=c("li"),Js=c("a"),Km=h("\u201CHow to unit test machine learning code\u201D"),zm=h(" b\u1EDFi Chase Roberts"),Mm=m(),Ta=c("li"),Ws=c("a"),Vm=h("\u201CA Recipe for Training Neural Networks\u201D"),Fm=h(" b\u1EDFi Andrej Karpathy"),mc=m(),xa=c("p"),Hm=h("T\u1EA5t nhi\xEAn, kh\xF4ng ph\u1EA3i m\u1ECDi v\u1EA5n \u0111\u1EC1 b\u1EA1n g\u1EB7p ph\u1EA3i khi hu\u1EA5n luy\u1EC7n m\u1EA1ng th\u1EA7n kinh \u0111\u1EC1u l\xE0 l\u1ED7i c\u1EE7a ch\xEDnh b\u1EA1n! N\u1EBFu b\u1EA1n g\u1EB7p \u0111i\u1EC1u g\xEC \u0111\xF3 trong th\u01B0 vi\u1EC7n \u{1F917} Transformers ho\u1EB7c \u{1F917} Datasets c\xF3 v\u1EBB kh\xF4ng \u1ED5n, c\xF3 th\u1EC3 b\u1EA1n \u0111\xE3 g\u1EB7p l\u1ED7i. B\u1EA1n ch\u1EAFc ch\u1EAFn n\xEAn cho ch\xFAng t\xF4i bi\u1EBFt t\u1EA5t c\u1EA3 v\u1EC1 \u0111i\u1EC1u \u0111\xF3 v\xE0 trong ph\u1EA7n ti\u1EBFp theo, ch\xFAng t\xF4i s\u1EBD gi\u1EA3i th\xEDch ch\xEDnh x\xE1c c\xE1ch th\u1EF1c hi\u1EC7n \u0111i\u1EC1u \u0111\xF3."),this.h()},l(n){const t=k0('[data-svelte="svelte-1phssyn"]',document.head);b=e(t,"META",{name:!0,content:!0}),t.forEach(a),E=u(n),g(d.$$.fragment,n),_=u(n),P=e(n,"H1",{class:!0});var Ys=p(P);T=e(Ys,"A",{id:!0,class:!0,href:!0});var dl=p(T);N=e(dl,"SPAN",{});var kl=p(N);g(D.$$.fragment,kl),kl.forEach(a),dl.forEach(a),en=u(Ys),pn=e(Ys,"SPAN",{});var $l=p(pn);ls=l($l,"G\u1EE1 l\u1ED7i quy tr\xECnh hu\u1EA5n luy\u1EC7n"),$l.forEach(a),Ys.forEach(a),J=u(n),g(H.$$.fragment,n),_n=u(n),A=e(n,"P",{});var $n=p(A);K=l($n,"B\u1EA1n \u0111\xE3 vi\u1EBFt m\u1ED9t k\u1ECBch b\u1EA3n tuy\u1EC7t \u0111\u1EB9p \u0111\u1EC3 hu\u1EA5n luy\u1EC7n ho\u1EB7c tinh ch\u1EC9nh m\u1ED9t m\xF4 h\xECnh trong m\u1ED9t t\xE1c v\u1EE5 nh\u1EA5t \u0111\u1ECBnh, tu\xE2n th\u1EE7 m\u1ED9t c\xE1ch nghi\xEAm t\xFAc l\u1EDDi khuy\xEAn t\u1EEB "),W=e($n,"A",{href:!0});var _l=p(W);rn=l(_l,"Ch\u01B0\u01A1ng 7"),_l.forEach(a),ts=l($n,". Nh\u01B0ng khi b\u1EA1n kh\u1EDFi ch\u1EA1y l\u1EC7nh "),mn=e($n,"CODE",{});var Xm=p(mn);En=l(Xm,"model.fit()"),Xm.forEach(a),Y=l($n,", m\u1ED9t \u0111i\u1EC1u kinh kh\u1EE7ng x\u1EA3y ra: b\u1EA1n g\u1EB7p l\u1ED7i \u{1F631}! Ho\u1EB7c t\u1EC7 h\u01A1n, m\u1ECDi th\u1EE9 d\u01B0\u1EDDng nh\u01B0 \u1ED5n v\xE0 qu\xE1 tr\xECnh hu\u1EA5n luy\u1EC7n ch\u1EA1y m\xE0 kh\xF4ng c\xF3 l\u1ED7i, nh\u01B0ng m\xF4 h\xECnh k\u1EBFt qu\u1EA3 l\xE0 t\u1ED3i t\u1EC7. Trong ph\u1EA7n n\xE0y, ch\xFAng t\xF4i s\u1EBD ch\u1EC9 cho b\u1EA1n nh\u1EEFng g\xEC b\u1EA1n c\xF3 th\u1EC3 l\xE0m \u0111\u1EC3 g\u1EE1 l\u1ED7i c\xE1c lo\u1EA1i v\u1EA5n \u0111\u1EC1 n\xE0y."),$n.forEach(a),wn=u(n),g(q.$$.fragment,n),C=u(n),G=e(n,"P",{});var ic=p(G);sa=l(ic,"V\u1EA5n \u0111\u1EC1 khi b\u1EA1n g\u1EB7p l\u1ED7i trong  "),qn=e(ic,"CODE",{});var Jm=p(qn);aa=l(Jm,"model.fit()"),Jm.forEach(a),Cn=l(ic,"  c\xF3 th\u1EC3 \u0111\u1EBFn t\u1EEB nhi\u1EC1u ngu\u1ED3n, v\xEC vi\u1EC7c hu\u1EA5n luy\u1EC7n th\u01B0\u1EDDng t\u1EADp h\u1EE3p r\u1EA5t nhi\u1EC1u th\u1EE9 l\u1EA1i v\u1EDBi nhau. V\u1EA5n \u0111\u1EC1 c\xF3 th\u1EC3 l\xE0 m\u1ED9t c\xE1i g\xEC \u0111\xF3 sai trong b\u1ED9 d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n ho\u1EB7c m\u1ED9t s\u1ED1 v\u1EA5n \u0111\u1EC1 khi c\u1ED1 g\u1EAFng k\u1EBFt h\u1EE3p h\xE0ng lo\u1EA1t c\xE1c ph\u1EA7n t\u1EED c\u1EE7a b\u1ED9 d\u1EEF li\u1EC7u v\u1EDBi nhau. Sau \u0111\xF3, n\xF3 l\u1EA5y m\u1ED9t lo\u1EA1t d\u1EEF li\u1EC7u v\xE0 \u0111\u01B0a n\xF3 v\xE0o m\xF4 h\xECnh, v\xEC v\u1EADy v\u1EA5n \u0111\u1EC1 c\xF3 th\u1EC3 n\u1EB1m \u1EDF m\xE3 m\xF4 h\xECnh. Sau \u0111\xF3, n\xF3 t\xEDnh to\xE1n c\xE1c \u0111\u1ED9 d\u1ED1c v\xE0 th\u1EF1c hi\u1EC7n b\u01B0\u1EDBc t\u1ED1i \u01B0u h\xF3a, v\xEC v\u1EADy v\u1EA5n \u0111\u1EC1 c\u0169ng c\xF3 th\u1EC3 n\u1EB1m trong tr\xECnh t\u1ED1i \u01B0u h\xF3a c\u1EE7a b\u1EA1n. V\xE0 ngay c\u1EA3 khi m\u1ECDi th\u1EE9 di\u1EC5n ra t\u1ED1t \u0111\u1EB9p cho qu\xE1 tr\xECnh hu\u1EA5n luy\u1EC7n, v\u1EABn c\xF3 th\u1EC3 x\u1EA3y ra s\u1EF1 c\u1ED1 trong qu\xE1 tr\xECnh \u0111\xE1nh gi\xE1 n\u1EBFu c\xF3 v\u1EA5n \u0111\u1EC1 v\u1EDBi ch\u1EC9 s\u1ED1 c\u1EE7a b\u1EA1n."),ic.forEach(a),cs=u(n),L=e(n,"P",{});var bc=p(L);Bc=l(bc,"C\xE1ch t\u1ED1t nh\u1EA5t \u0111\u1EC3 g\u1EE1 l\u1ED7i ph\xE1t sinh trong "),za=e(bc,"CODE",{});var Wm=p(za);Sc=l(Wm,"model.fit()"),Wm.forEach(a),Kc=l(bc," l\xE0 \u0111i qua to\xE0n pipeline n\xE0y theo c\xE1ch th\u1EE7 c\xF4ng \u0111\u1EC3 xem m\u1ECDi th\u1EE9 di\u1EC5n ra nh\u01B0 th\u1EBF n\xE0o. Sau \u0111\xF3, l\u1ED7i th\u01B0\u1EDDng r\u1EA5t d\u1EC5 gi\u1EA3i quy\u1EBFt."),bc.forEach(a),wl=u(n),Tn=e(n,"P",{});var oc=p(Tn);zc=l(oc,"\u0110\u1EC3 ch\u1EE9ng minh \u0111i\u1EC1u n\xE0y, ch\xFAng ta s\u1EBD s\u1EED d\u1EE5ng t\u1EADp l\u1EC7nh (c\u1ED1 g\u1EAFng) tinh ch\u1EC9nh m\xF4 h\xECnh DistilBERT tr\xEAn "),es=e(oc,"A",{href:!0,rel:!0});var Ym=p(es);Mc=l(Ym,"t\u1EADp d\u1EEF li\u1EC7u MNLI"),Ym.forEach(a),Vc=l(oc,":"),oc.forEach(a),ql=u(n),g(ps.$$.fragment,n),Cl=u(n),xn=e(n,"P",{});var gc=p(xn);Fc=l(gc,"N\u1EBFu b\u1EA1n c\u1ED1 g\u1EAFng th\u1EF1c thi n\xF3, b\u1EA1n c\xF3 th\u1EC3 nh\u1EADn \u0111\u01B0\u1EE3c m\u1ED9t s\u1ED1 "),Ma=e(gc,"CODE",{});var Zm=p(Ma);Hc=l(Zm,"VisibleDeprecationWarning"),Zm.forEach(a),Gc=l(gc," khi th\u1EF1c hi\u1EC7n chuy\u1EC3n \u0111\u1ED5i t\u1EADp d\u1EEF li\u1EC7u - \u0111\xE2y l\xE0 m\u1ED9t v\u1EA5n \u0111\u1EC1 UX \u0111\xE3 bi\u1EBFt m\xE0 ch\xFAng ta g\u1EB7p ph\u1EA3i, v\xEC v\u1EADy vui l\xF2ng b\u1ECF qua n\xF3. N\u1EBFu b\u1EA1n \u0111ang \u0111\u1ECDc kh\xF3a h\u1ECDc sau \u0111\xF3, ch\u1EB3ng h\u1EA1n nh\u01B0 th\xE1ng 11 n\u0103m 2021 v\xE0 n\xF3 v\u1EABn \u0111ang di\u1EC5n ra, th\xEC h\xE3y g\u1EEDi nh\u1EEFng d\xF2ng tweet gi\u1EADn d\u1EEF t\u1EA1i @carrigmat cho \u0111\u1EBFn khi anh \u1EA5y s\u1EEDa n\xF3."),gc.forEach(a),Tl=u(n),ha=e(n,"P",{});var Qm=p(ha);Lc=l(Qm,"Tuy nhi\xEAn, m\u1ED9t v\u1EA5n \u0111\u1EC1 nghi\xEAm tr\u1ECDng h\u01A1n l\xE0 ch\xFAng ta nh\u1EADn \u0111\u01B0\u1EE3c m\u1ED9t l\u1ED7i tr\u1ECDn v\u1EB9n. V\xE0 n\xF3 th\u1EF1c s\u1EF1 r\u1EA5t d\xE0i:"),Qm.forEach(a),xl=u(n),g(rs.$$.fragment,n),Pl=u(n),la=e(n,"P",{});var nu=p(la);Uc=l(nu,"\u0110i\u1EC1u \u0111\xF3 ngh\u0129a l\xE0 g\xEC? Ch\xFAng ta \u0111\xE3 c\u1ED1 g\u1EAFng hu\u1EA5n luy\u1EC7n tr\xEAn d\u1EEF li\u1EC7u c\u1EE7a m\xECnh, nh\u01B0ng ch\xFAng ta kh\xF4ng c\xF3 gradient? \u0110i\u1EC1u n\xE0y kh\xE1 b\u1ED1i r\u1ED1i; l\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ch\xFAng ta th\u1EADm ch\xED b\u1EAFt \u0111\u1EA7u g\u1EE1 l\u1ED7i m\u1ED9t c\xE1i g\xEC \u0111\xF3 nh\u01B0 v\u1EADy? Khi l\u1ED7i b\u1EA1n g\u1EB7p ph\u1EA3i kh\xF4ng g\u1EE3i \xFD ngay v\u1EA5n \u0111\u1EC1 n\u1EB1m \u1EDF \u0111\xE2u, gi\u1EA3i ph\xE1p t\u1ED1t nh\u1EA5t th\u01B0\u1EDDng l\xE0 th\u1EF1c hi\u1EC7n m\u1ECDi th\u1EE9 theo tr\xECnh t\u1EF1, \u0111\u1EA3m b\u1EA3o \u1EDF m\u1ED7i giai \u0111o\u1EA1n m\u1ECDi th\u1EE9 \u0111\u1EC1u \u1ED5n. V\xE0 t\u1EA5t nhi\xEAn, n\u01A1i b\u1EAFt \u0111\u1EA7u lu\xF4n l\xE0\u2026"),nu.forEach(a),Nl=u(n),un=e(n,"H3",{class:!0});var jc=p(un);Pn=e(jc,"A",{id:!0,class:!0,href:!0});var su=p(Pn);Va=e(su,"SPAN",{});var au=p(Va);g(ms.$$.fragment,au),au.forEach(a),su.forEach(a),Rc=u(jc),Fa=e(jc,"SPAN",{});var hu=p(Fa);Ic=l(hu,"Ki\u1EC3m tra d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n"),hu.forEach(a),jc.forEach(a),Al=u(n),ta=e(n,"P",{});var lu=p(ta);Xc=l(lu,"\u0110i\u1EC1u n\xE0y kh\xF4ng c\u1EA7n ph\u1EA3i n\xF3i, nh\u01B0ng n\u1EBFu d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n b\u1ECB h\u1ECFng, Keras s\u1EBD kh\xF4ng th\u1EC3 s\u1EEDa n\xF3 cho b\u1EA1n. V\xEC v\u1EADy, \u0111i\u1EC1u \u0111\u1EA7u ti\xEAn, b\u1EA1n c\u1EA7n ph\u1EA3i xem x\xE9t nh\u1EEFng g\xEC b\xEAn trong b\u1ED9 hu\u1EA5n luy\u1EC7n c\u1EE7a b\u1EA1n."),lu.forEach(a),Dl=u(n),x=e(n,"P",{});var B=p(x);Jc=l(B,"M\u1EB7c d\xF9 r\u1EA5t h\u1EA5p d\u1EABn khi nh\xECn v\xE0o b\xEAn trong "),Ha=e(B,"CODE",{});var tu=p(Ha);Wc=l(tu,"raw_datasets"),tu.forEach(a),Yc=l(B," v\xE0 "),Ga=e(B,"CODE",{});var cu=p(Ga);Zc=l(cu,"tokenized_datasets"),cu.forEach(a),Qc=l(B,", ch\xFAng t\xF4i th\u1EF1c s\u1EF1 khuy\xEAn b\u1EA1n n\xEAn truy c\u1EADp d\u1EEF li\u1EC7u ngay t\u1EA1i \u0111i\u1EC3m m\xE0 n\xF3 \u0111\u01B0\u1EE3c \u0111\u01B0a v\xE0o m\xF4 h\xECnh. \u0110i\u1EC1u \u0111\xF3 c\xF3 ngh\u0129a l\xE0 \u0111\u1ECDc k\u1EBFt qu\u1EA3 \u0111\u1EA7u ra t\u1EEB "),La=e(B,"CODE",{});var eu=p(La);ne=l(eu,"tf.data.Dataset"),eu.forEach(a),se=l(B," m\xE0 b\u1EA1n \u0111\xE3 t\u1EA1o b\u1EB1ng h\xE0m "),Ua=e(B,"CODE",{});var pu=p(Ua);ae=l(pu,"to_tf_dataset()"),pu.forEach(a),he=l(B,"! V\xEC v\u1EADy, l\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ch\xFAng ta l\xE0m \u0111i\u1EC1u \u0111\xF3? C\xE1c \u0111\u1ED1i t\u01B0\u1EE3ng "),Ra=e(B,"CODE",{});var ru=p(Ra);le=l(ru,"tf.data.Dataset"),ru.forEach(a),te=l(B," cung c\u1EA5p cho ch\xFAng ta to\xE0n b\u1ED9 c\xE1c l\xF4 c\xF9ng m\u1ED9t l\xFAc v\xE0 kh\xF4ng h\u1ED7 tr\u1EE3 l\u1EADp ch\u1EC9 m\u1EE5c, v\xEC v\u1EADy ch\xFAng ta kh\xF4ng th\u1EC3 ch\u1EC9 y\xEAu c\u1EA7u "),Ia=e(B,"CODE",{});var mu=p(Ia);ce=l(mu,"train_dataset[0]"),mu.forEach(a),ee=l(B,". Tuy nhi\xEAn, ch\xFAng ta c\xF3 th\u1EC3 y\xEAu c\u1EA7u n\xF3 m\u1ED9t c\xE1ch l\u1ECBch s\u1EF1 cho m\u1ED9t l\xF4:"),B.forEach(a),Ol=u(n),g(us.$$.fragment,n),Bl=u(n),U=e(n,"P",{});var Zs=p(U);Xa=e(Zs,"CODE",{});var uu=p(Xa);pe=l(uu,"break"),uu.forEach(a),re=l(Zs," k\u1EBFt th\xFAc v\xF2ng l\u1EB7p sau m\u1ED9t l\u1EA7n l\u1EB7p, v\xEC v\u1EADy, \u0111i\u1EC1u n\xE0y l\u1EA5y l\xF4 \u0111\u1EA7u ti\xEAn ra kh\u1ECFi "),Ja=e(Zs,"CODE",{});var iu=p(Ja);me=l(iu,"train_dataset"),iu.forEach(a),ue=l(Zs," v\xE0 l\u01B0u n\xF3 d\u01B0\u1EDBi d\u1EA1ng "),Wa=e(Zs,"CODE",{});var bu=p(Wa);ie=l(bu,"batch"),bu.forEach(a),be=l(Zs,". B\xE2y gi\u1EDD, ch\xFAng ta h\xE3y xem nh\u1EEFng g\xEC b\xEAn trong:"),Zs.forEach(a),Sl=u(n),g(is.$$.fragment,n),Kl=u(n),z=e(n,"P",{});var ns=p(z);oe=l(ns,"\u0110i\u1EC1u n\xE0y c\xF3 v\u1EBB \u0111\xFAng, ph\u1EA3i kh\xF4ng? Ch\xFAng ta \u0111ang chuy\u1EC3n c\xE1c nh\xE3n "),Ya=e(ns,"CODE",{});var ou=p(Ya);ge=l(ou,"labels"),ou.forEach(a),je=l(ns,", "),Za=e(ns,"CODE",{});var gu=p(Za);fe=l(gu,"attention_mask"),gu.forEach(a),ve=l(ns,", v\xE0 "),Qa=e(ns,"CODE",{});var ju=p(Qa);ye=l(ju,"input_ids"),ju.forEach(a),de=l(ns," cho m\xF4 h\xECnh, \u0111\xE2y s\u1EBD l\xE0 m\u1ECDi th\u1EE9 n\xF3 c\u1EA7n \u0111\u1EC3 t\xEDnh to\xE1n k\u1EBFt qu\u1EA3 \u0111\u1EA7u ra v\xE0 t\xEDnh to\xE1n m\u1EA5t m\xE1t. V\u1EADy t\u1EA1i sao ch\xFAng ta kh\xF4ng c\xF3 m\u1ED9t gradient? Nh\xECn k\u1EF9 h\u01A1n: ch\xFAng ta \u0111ang chuy\u1EC3n m\u1ED9t t\u1EEB \u0111i\u1EC3n duy nh\u1EA5t l\xE0m \u0111\u1EA7u v\xE0o, nh\u01B0ng m\u1ED9t l\xF4 hu\u1EA5n luy\u1EC7n th\u01B0\u1EDDng l\xE0 m\u1ED9t tensor \u0111\u1EA7u v\xE0o ho\u1EB7c t\u1EEB \u0111i\u1EC3n, c\u1ED9ng v\u1EDBi m\u1ED9t tensor nh\xE3n. Nh\xE3n c\u1EE7a ch\xFAng ta l\xE0 m\u1ED9t ch\xECa kh\xF3a trong t\u1EEB \u0111i\u1EC3n \u0111\u1EA7u v\xE0o c\u1EE7a m\xECnh."),ns.forEach(a),zl=u(n),Nn=e(n,"P",{});var fc=p(Nn);ke=l(fc,"\u0110\xE2y c\xF3 pha\u0309i l\xE0 v\u1EA5n \u0111\xEA? Kh\xF4ng ph\u1EA3i l\xFAc n\xE0o c\u0169ng v\u1EADy! Nh\u01B0ng \u0111\xF3 l\xE0 m\u1ED9t trong nh\u1EEFng v\u1EA5n \u0111\u1EC1 ph\u1ED5 bi\u1EBFn nh\u1EA5t m\xE0 b\u1EA1n s\u1EBD g\u1EB7p ph\u1EA3i khi hu\u1EA5n luy\u1EC7n c\xE1c m\xF4 h\xECnh Transformer v\u1EDBi TensorFlow. T\u1EA5t c\u1EA3 c\xE1c m\xF4 h\xECnh c\u1EE7a ch\xFAng ta \u0111\u1EC1u c\xF3 th\u1EC3 t\xEDnh to\xE1n m\u1EA5t m\xE1t trong n\u1ED9i b\u1ED9, nh\u01B0ng \u0111\u1EC3 l\xE0m \u0111\u01B0\u1EE3c \u0111i\u1EC1u \u0111\xF3, c\xE1c nh\xE3n c\u1EA7n \u0111\u01B0\u1EE3c chuy\u1EC3n v\xE0o t\u1EEB \u0111i\u1EC3n \u0111\u1EA7u v\xE0o. \u0110\xE2y l\xE0 m\u1EA5t m\xE1t \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng khi ch\xFAng ta kh\xF4ng ch\u1EC9 \u0111\u1ECBnh gi\xE1 tr\u1ECB t\u1ED5n th\u1EA5t cho "),nh=e(fc,"CODE",{});var fu=p(nh);$e=l(fu,"compile()"),fu.forEach(a),_e=l(fc,". M\u1EB7t kh\xE1c, Keras th\u01B0\u1EDDng mong \u0111\u1EE3i c\xE1c nh\xE3n \u0111\u01B0\u1EE3c chuy\u1EC3n ri\xEAng kh\u1ECFi t\u1EEB \u0111i\u1EC3n \u0111\u1EA7u v\xE0o v\xE0 c\xE1c t\xEDnh to\xE1n t\u1ED5n th\u1EA5t th\u01B0\u1EDDng s\u1EBD th\u1EA5t b\u1EA1i n\u1EBFu b\u1EA1n kh\xF4ng l\xE0m \u0111i\u1EC1u \u0111\xF3."),fc.forEach(a),Ml=u(n),Z=e(n,"P",{});var Pa=p(Z);Ee=l(Pa,"V\u1EA5n \u0111\u1EC1 gi\u1EDD \u0111\xE3 tr\u1EDF n\xEAn r\xF5 r\xE0ng h\u01A1n: ch\xFAng ta \u0111\xE3 th\xF4ng qua tham s\u1ED1 "),sh=e(Pa,"CODE",{});var vu=p(sh);we=l(vu,"loss"),vu.forEach(a),qe=l(Pa,", c\xF3 ngh\u0129a l\xE0 ch\xFAng ta \u0111ang y\xEAu c\u1EA7u Keras t\xEDnh to\xE1n kho\u1EA3n m\u1EA5t m\xE1t c\u1EE7a m\xECnh, nh\u01B0ng ch\xFAng ta \u0111\xE3 chuy\u1EC3n nh\xE3n c\u1EE7a m\xECnh l\xE0m \u0111\u1EA7u v\xE0o cho m\xF4 h\xECnh, kh\xF4ng ph\u1EA3i l\xE0 nh\xE3n \u1EDF n\u01A1i Keras mong \u0111\u1EE3i ch\xFAng! Ch\xFAng ta c\u1EA7n ch\u1ECDn c\xE1i n\xE0y hay c\xE1i kia: ho\u1EB7c ch\xFAng ta s\u1EED d\u1EE5ng t\u1ED5n th\u1EA5t b\xEAn trong c\u1EE7a m\xF4 h\xECnh v\xE0 gi\u1EEF c\xE1c nh\xE3n \u1EDF v\u1ECB tr\xED c\u1EE7a ch\xFAng, ho\u1EB7c ch\xFAng ta ti\u1EBFp t\u1EE5c s\u1EED d\u1EE5ng t\u1ED5n th\u1EA5t Keras, nh\u01B0ng ch\xFAng ta chuy\u1EC3n c\xE1c nh\xE3n \u0111\u1EBFn n\u01A1i m\xE0 Keras mong \u0111\u1EE3i ch\xFAng. \u0110\u1EC3 \u0111\u01A1n gi\u1EA3n, ch\xFAng ta h\xE3y th\u1EF1c hi\u1EC7n c\xE1ch ti\u1EBFp c\u1EADn \u0111\u1EA7u ti\xEAn. Thay \u0111\u1ED5i l\u1EC7nh g\u1ECDi th\xE0nh "),ah=e(Pa,"CODE",{});var yu=p(ah);Ce=l(yu,"compile()"),yu.forEach(a),Te=l(Pa," \u0111\u1EC3 \u0111\u1ECDc:"),Pa.forEach(a),Vl=u(n),g(bs.$$.fragment,n),Fl=u(n),ca=e(n,"P",{});var du=p(ca);xe=l(du,"B\xE2y gi\u1EDD ch\xFAng ta s\u1EBD s\u1EED d\u1EE5ng m\u1EA5t m\xE1t b\xEAn trong c\u1EE7a m\xF4 h\xECnh v\xE0 v\u1EA5n \u0111\u1EC1 n\xE0y s\u1EBD \u0111\u01B0\u1EE3c gi\u1EA3i quy\u1EBFt!"),du.forEach(a),Hl=u(n),g(An.$$.fragment,n),Gl=u(n),Dn=e(n,"P",{});var vc=p(Dn);Pe=l(vc,"B\xE2y gi\u1EDD, ch\xFAng ta h\xE3y th\u1EED hu\u1EA5n luy\u1EC7n. B\xE2y gi\u1EDD ch\xFAng ta s\u1EBD nh\u1EADn \u0111\u01B0\u1EE3c gradient, v\xEC v\u1EADy hy v\u1ECDng (nh\u1EA1c \u0111\xE1ng ng\u1EA1i ph\xE1t \u1EDF \u0111\xE2y) ch\xFAng ta c\xF3 th\u1EC3 g\u1ECDi "),hh=e(vc,"CODE",{});var ku=p(hh);Ne=l(ku,"model.fit()"),ku.forEach(a),Ae=l(vc," v\xE0 m\u1ECDi th\u1EE9 s\u1EBD ho\u1EA1t \u0111\u1ED9ng t\u1ED1t!"),vc.forEach(a),Ll=u(n),g(os.$$.fragment,n),Ul=u(n),ea=e(n,"P",{});var $u=p(ea);De=l($u,"\xD4i kh\xF4ng."),$u.forEach(a),Rl=u(n),gs=e(n,"P",{});var Gm=p(gs);lh=e(Gm,"CODE",{});var _u=p(lh);Oe=l(_u,"nan"),_u.forEach(a),Be=l(Gm," kh\xF4ng ph\u1EA3i l\xE0 m\u1ED9t gi\xE1 tr\u1ECB m\u1EA5t m\xE1t \u0111\xE1ng kh\xEDch l\u1EC7. Tuy nhi\xEAn, ch\xFAng ta \u0111\xE3 ki\u1EC3m tra d\u1EEF li\u1EC7u c\u1EE7a m\xECnh v\xE0 n\xF3 tr\xF4ng kh\xE1 \u1ED5n. N\u1EBFu \u0111\xF3 kh\xF4ng ph\u1EA3i l\xE0 v\u1EA5n \u0111\u1EC1, ch\xFAng ta c\xF3 th\u1EC3 \u0111i \u0111\xE2u ti\u1EBFp theo? B\u01B0\u1EDBc ti\u1EBFp theo r\xF5 r\xE0ng l\xE0 \u2026"),Gm.forEach(a),Il=u(n),bn=e(n,"H3",{class:!0});var yc=p(bn);On=e(yc,"A",{id:!0,class:!0,href:!0});var Eu=p(On);th=e(Eu,"SPAN",{});var wu=p(th);g(js.$$.fragment,wu),wu.forEach(a),Eu.forEach(a),Se=u(yc),ch=e(yc,"SPAN",{});var qu=p(ch);Ke=l(qu,"Ki\u1EC3m tra m\xF4 h\xECnh c\u1EE7a b\u1EA1n"),qu.forEach(a),yc.forEach(a),Xl=u(n),R=e(n,"P",{});var Qs=p(R);eh=e(Qs,"CODE",{});var Cu=p(eh);ze=l(Cu,"model.fit()"),Cu.forEach(a),Me=l(Qs," l\xE0 m\u1ED9t h\xE0m ti\u1EC7n l\u1EE3i th\u1EF1c s\u1EF1 tuy\u1EC7t v\u1EDDi trong Keras, nh\u01B0ng n\xF3 l\xE0m \u0111\u01B0\u1EE3c r\u1EA5t nhi\u1EC1u th\u1EE9 cho b\u1EA1n v\xE0 \u0111i\u1EC1u \u0111\xF3 c\xF3 th\u1EC3 khi\u1EBFn vi\u1EC7c t\xECm ch\xEDnh x\xE1c v\u1ECB tr\xED \u0111\xE3 x\u1EA3y ra s\u1EF1 c\u1ED1 tr\u1EDF n\xEAn kh\xF3 kh\u0103n h\u01A1n. N\u1EBFu b\u1EA1n \u0111ang g\u1EE1 l\u1ED7i m\xF4 h\xECnh c\u1EE7a m\xECnh, m\u1ED9t chi\u1EBFn l\u01B0\u1EE3c th\u1EF1c s\u1EF1 c\xF3 th\u1EC3 h\u1EEFu \xEDch l\xE0 ch\u1EC9 chuy\u1EC3n m\u1ED9t l\xF4 duy nh\u1EA5t cho m\xF4 h\xECnh v\xE0 xem x\xE9t chi ti\u1EBFt k\u1EBFt qu\u1EA3 \u0111\u1EA7u ra c\u1EE7a m\u1ED9t l\xF4 \u0111\xF3. M\u1ED9t m\u1EB9o th\u1EF1c s\u1EF1 h\u1EEFu \xEDch kh\xE1c n\u1EBFu m\xF4 h\xECnh \u0111ang g\u1EB7p l\u1ED7i l\xE0 "),ph=e(Qs,"CODE",{});var Tu=p(ph);Ve=l(Tu,"compile()"),Tu.forEach(a),Fe=l(Qs," m\xF4 h\xECnh v\u1EDBi "),rh=e(Qs,"CODE",{});var xu=p(rh);He=l(xu,"run_eagerly=True"),xu.forEach(a),Ge=l(Qs,". \u0110i\u1EC1u n\xE0y s\u1EBD l\xE0m cho n\xF3 ch\u1EADm h\u01A1n r\u1EA5t nhi\u1EC1u, nh\u01B0ng n\xF3 s\u1EBD l\xE0m cho c\xE1c th\xF4ng b\xE1o l\u1ED7i d\u1EC5 hi\u1EC3u h\u01A1n nhi\u1EC1u, b\u1EDFi v\xEC ch\xFAng s\u1EBD ch\u1EC9 ra ch\xEDnh x\xE1c v\u1ECB tr\xED x\u1EA3y ra s\u1EF1 c\u1ED1 trong m\xE3 m\xF4 h\xECnh c\u1EE7a b\u1EA1n."),Qs.forEach(a),Jl=u(n),Q=e(n,"P",{});var Na=p(Q);Le=l(Na,"Tuy nhi\xEAn, hi\u1EC7n t\u1EA1i, ch\xFAng ta ch\u01B0a c\u1EA7n \u0111\u1EBFn "),mh=e(Na,"CODE",{});var Pu=p(mh);Ue=l(Pu,"run_eagerly"),Pu.forEach(a),Re=l(Na,". H\xE3y ch\u1EA1y "),uh=e(Na,"CODE",{});var Nu=p(uh);Ie=l(Nu,"batch"),Nu.forEach(a),Xe=l(Na," m\xE0 ch\xFAng ta \u0111\xE3 c\xF3 tr\u01B0\u1EDBc \u0111\xF3 th\xF4ng qua m\xF4 h\xECnh v\xE0 xem k\u1EBFt qu\u1EA3 \u0111\u1EA7u ra tr\xF4ng nh\u01B0 th\u1EBF n\xE0o:"),Na.forEach(a),Wl=u(n),g(fs.$$.fragment,n),Yl=u(n),g(vs.$$.fragment,n),Zl=u(n),k=e(n,"P",{});var $=p(k);Je=l($,"Ch\xE0, \u0111i\u1EC1u n\xE0y th\u1EADt kh\xF3. M\u1ECDi th\u1EE9 \u0111\u1EC1u l\xE0 "),ih=e($,"CODE",{});var Au=p(ih);We=l(Au,"nan"),Au.forEach(a),Ye=l($,"! Nh\u01B0ng th\u1EADt l\u1EA1 ph\u1EA3i kh\xF4ng? L\xE0m th\u1EBF n\xE0o m\xE0 t\u1EA5t c\u1EA3 nh\u1EADt k\xFD c\u1EE7a ch\xFAng ta s\u1EBD tr\u1EDF th\xE0nh "),bh=e($,"CODE",{});var Du=p(bh);Ze=l(Du,"nan"),Du.forEach(a),Qe=l($,"? "),oh=e($,"CODE",{});var Ou=p(oh);np=l(Ou,"nan"),Ou.forEach(a),sp=l($," c\xF3 ngh\u0129a l\xE0 \u201Ckh\xF4ng ph\u1EA3i l\xE0 s\u1ED1\u201D. Gi\xE1 tr\u1ECB "),gh=e($,"CODE",{});var Bu=p(gh);ap=l(Bu,"nan"),Bu.forEach(a),hp=l($," th\u01B0\u1EDDng x\u1EA3y ra khi b\u1EA1n th\u1EF1c hi\u1EC7n m\u1ED9t thao t\xE1c b\u1ECB c\u1EA5m, ch\u1EB3ng h\u1EA1n nh\u01B0 chia cho s\u1ED1 kh\xF4ng. Nh\u01B0ng m\u1ED9t \u0111i\u1EC1u r\u1EA5t quan tr\u1ECDng c\u1EA7n bi\u1EBFt v\u1EC1 "),jh=e($,"CODE",{});var Su=p(jh);lp=l(Su,"nan"),Su.forEach(a),tp=l($," trong h\u1ECDc m\xE1y l\xE0 gi\xE1 tr\u1ECB n\xE0y c\xF3 xu h\u01B0\u1EDBng "),fh=e($,"EM",{});var Ku=p(fh);cp=l(Ku,"lan truy\u1EC1n"),Ku.forEach(a),ep=l($,". N\u1EBFu b\u1EA1n nh\xE2n m\u1ED9t s\u1ED1 v\u1EDBi "),vh=e($,"CODE",{});var zu=p(vh);pp=l(zu,"nan"),zu.forEach(a),rp=l($,", k\u1EBFt qu\u1EA3 c\u0169ng l\xE0 "),yh=e($,"CODE",{});var Mu=p(yh);mp=l(Mu,"nan"),Mu.forEach(a),up=l($,". V\xE0 n\u1EBFu b\u1EA1n nh\u1EADn \u0111\u01B0\u1EE3c m\u1ED9t "),dh=e($,"CODE",{});var Vu=p(dh);ip=l(Vu,"nan"),Vu.forEach(a),bp=l($," \u1EDF b\u1EA5t k\u1EF3 \u0111\xE2u trong \u0111\u1EA7u ra, s\u1EF1 m\u1EA5t m\xE1t ho\u1EB7c \u0111\u1ED9 d\u1ED1c c\u1EE7a b\u1EA1n, th\xEC n\xF3 s\u1EBD nhanh ch\xF3ng lan r\u1ED9ng ra to\xE0n b\u1ED9 m\xF4 h\xECnh c\u1EE7a b\u1EA1n - b\u1EDFi v\xEC khi gi\xE1 tr\u1ECB "),kh=e($,"CODE",{});var Fu=p(kh);op=l(Fu,"nan"),Fu.forEach(a),gp=l($," \u0111\xF3 \u0111\u01B0\u1EE3c truy\u1EC1n tr\u1EDF l\u1EA1i qua m\u1EA1ng c\u1EE7a b\u1EA1n, b\u1EA1n s\u1EBD nh\u1EADn \u0111\u01B0\u1EE3c "),$h=e($,"CODE",{});var Hu=p($h);jp=l(Hu,"nan"),Hu.forEach(a),fp=l($," gradient v\xE0 khi c\u1EADp nh\u1EADt tr\u1ECDng s\u1ED1 \u0111\u01B0\u1EE3c t\xEDnh to\xE1n v\u1EDBi nh\u1EEFng gradient \u0111\xF3, b\u1EA1n s\u1EBD nh\u1EADn \u0111\u01B0\u1EE3c tr\u1ECDng s\u1ED1 "),_h=e($,"CODE",{});var Gu=p(_h);vp=l(Gu,"nan"),Gu.forEach(a),yp=l($," v\xE0 nh\u1EEFng tr\u1ECDng s\u1ED1 \u0111\xF3 s\u1EBD t\xEDnh to\xE1n nhi\u1EC1u k\u1EBFt qu\u1EA3 \u0111\u1EA7u ra "),Eh=e($,"CODE",{});var Lu=p(Eh);dp=l(Lu,"nan"),Lu.forEach(a),kp=l($," h\u01A1n n\u1EEFa! Ch\u1EB3ng bao l\xE2u n\u1EEFa, to\xE0n b\u1ED9 m\u1EA1ng l\u01B0\u1EDBi s\u1EBD ch\u1EC9 l\xE0 m\u1ED9t kh\u1ED1i l\u1EDBn g\u1ED3m c\xE1c gi\xE1 tr\u1ECB "),wh=e($,"CODE",{});var Uu=p(wh);$p=l(Uu,"nan"),Uu.forEach(a),_p=l($,". M\u1ED9t khi \u0111i\u1EC1u \u0111\xF3 x\u1EA3y ra, th\u1EADt kh\xF3 \u0111\u1EC3 xem v\u1EA5n \u0111\u1EC1 b\u1EAFt \u0111\u1EA7u t\u1EEB \u0111\xE2u. L\xE0m th\u1EBF n\xE0o ch\xFAng ta c\xF3 th\u1EC3 c\xF4 l\u1EADp n\u01A1i m\xE0 "),qh=e($,"CODE",{});var Ru=p(qh);Ep=l(Ru,"nan"),Ru.forEach(a),wp=l($," len l\u1ECFi \u0111\u1EA7u ti\xEAn?"),$.forEach(a),Ql=u(n),M=e(n,"P",{});var ss=p(M);qp=l(ss,"C\xE2u tr\u1EA3 l\u1EDDi l\xE0 h\xE3y th\u1EED "),Ch=e(ss,"EM",{});var Iu=p(Ch);Cp=l(Iu,"kh\u1EDFi \u0111\u1ED9ng l\u1EA1i"),Iu.forEach(a),Tp=l(ss," m\xF4 h\xECnh. Khi ch\xFAng ta b\u1EAFt \u0111\u1EA7u hu\u1EA5n luy\u1EC7n, ch\xFAng ta c\xF3 m\u1ED9t "),Th=e(ss,"CODE",{});var Xu=p(Th);xp=l(Xu,"nan"),Xu.forEach(a),Pp=l(ss," \u1EDF \u0111\xE2u \u0111\xF3 v\xE0 n\xF3 nhanh ch\xF3ng \u0111\u01B0\u1EE3c truy\u1EC1n b\xE1 qua to\xE0n b\u1ED9 m\xF4 h\xECnh. V\xEC v\u1EADy, h\xE3y t\u1EA3i m\xF4 h\xECnh t\u1EEB m\u1ED9t checkpoint v\xE0 kh\xF4ng th\u1EF1c hi\u1EC7n b\u1EA5t k\u1EF3 c\u1EADp nh\u1EADt tr\u1ECDng s\u1ED1 n\xE0o v\xE0 xem n\u01A1i ch\xFAng ta nh\u1EADn \u0111\u01B0\u1EE3c gi\xE1 tr\u1ECB "),xh=e(ss,"CODE",{});var Ju=p(xh);Np=l(Ju,"nan"),Ju.forEach(a),Ap=l(ss,":"),ss.forEach(a),nt=u(n),g(ys.$$.fragment,n),st=u(n),pa=e(n,"P",{});var Wu=p(pa);Dp=l(Wu,"When we run that, we get:"),Wu.forEach(a),at=u(n),g(ds.$$.fragment,n),ht=u(n),I=e(n,"P",{});var na=p(I);Ph=e(na,"EM",{});var Yu=p(Ph);Op=l(Yu,"B\xE2y gi\u1EDD"),Yu.forEach(a),Bp=l(na," ch\xFAng ta \u0111ang \u0111\u1EBFn m\u1ED9t n\u01A1i n\xE0o \u0111\xF3! Kh\xF4ng c\xF3 gi\xE1 tr\u1ECB "),Nh=e(na,"CODE",{});var Zu=p(Nh);Sp=l(Zu,"nan"),Zu.forEach(a),Kp=l(na," n\xE0o trong nh\u1EADt k\xFD c\u1EE7a m\xECnh, \u0111i\u1EC1u n\xE0y khi\u1EBFn b\u1EA1n y\xEAn t\xE2m. Nh\u01B0ng ch\xFAng ta th\u1EA5y c\xF3 m\u1ED9t v\xE0i gi\xE1 tr\u1ECB "),Ah=e(na,"CODE",{});var Qu=p(Ah);zp=l(Qu,"nan"),Qu.forEach(a),Mp=l(na," b\u1ECB m\u1EA5t! C\xF3 \u0111i\u1EC1u g\xEC \u0111\xF3 \u0111\u1EB7c bi\u1EC7t v\u1EC1 c\xE1c m\u1EABu \u0111\xF3 g\xE2y ra v\u1EA5n \u0111\u1EC1 n\xE0y kh\xF4ng? H\xE3y xem ch\xFAng l\xE0 nh\u1EEFng c\xE1i n\xE0o (l\u01B0u \xFD r\u1EB1ng n\u1EBFu b\u1EA1n t\u1EF1 ch\u1EA1y m\xE3 n\xE0y, b\u1EA1n c\xF3 th\u1EC3 nh\u1EADn \u0111\u01B0\u1EE3c c\xE1c ch\u1EC9 s\u1ED1 kh\xE1c nhau v\xEC t\u1EADp d\u1EEF li\u1EC7u \u0111\xE3 b\u1ECB x\xE1o tr\u1ED9n):"),na.forEach(a),lt=u(n),g(ks.$$.fragment,n),tt=u(n),g($s.$$.fragment,n),ct=u(n),ra=e(n,"P",{});var ni=p(ra);Vp=l(ni,"H\xE3y xem c\xE1c m\u1EABu m\xE0 t\u1EA1o ra ch\u1EC9 s\u1ED1 n\xE0y:"),ni.forEach(a),et=u(n),g(_s.$$.fragment,n),pt=u(n),g(Es.$$.fragment,n),rt=u(n),ma=e(n,"P",{});var si=p(ma);Fp=l(si,"Ch\xE0, c\xF3 r\u1EA5t nhi\u1EC1u th\u1EE9 \u1EDF \u0111\xE2y, nh\u01B0ng kh\xF4ng c\xF3 g\xEC n\u1ED5i b\u1EADt l\xE0 b\u1EA5t th\u01B0\u1EDDng. H\xE3y xem c\xE1c nh\xE3n:"),si.forEach(a),mt=u(n),g(ws.$$.fragment,n),ut=u(n),g(qs.$$.fragment,n),it=u(n),nn=e(n,"P",{});var Aa=p(nn);Hp=l(Aa,"Ah! C\xE1c m\u1EABu "),Dh=e(Aa,"CODE",{});var ai=p(Dh);Gp=l(ai,"nan"),ai.forEach(a),Lp=l(Aa," \u0111\u1EC1u c\xF3 c\xF9ng m\u1ED9t nh\xE3n, v\xE0 \u0111\xF3 l\xE0 nh\xE3n 2. \u0110\xE2y l\xE0 m\u1ED9t g\u1EE3i \xFD r\u1EA5t m\u1EA1nh m\u1EBD. Th\u1EF1c t\u1EBF l\xE0 ch\xFAng ta ch\u1EC9 b\u1ECB m\u1EA5t "),Oh=e(Aa,"CODE",{});var hi=p(Oh);Up=l(hi,"nan"),hi.forEach(a),Rp=l(Aa," khi nh\xE3n c\u1EE7a ch\xFAng ta l\xE0 2 cho th\u1EA5y r\u1EB1ng \u0111\xE2y l\xE0 th\u1EDDi \u0111i\u1EC3m r\u1EA5t t\u1ED1t \u0111\u1EC3 ki\u1EC3m tra s\u1ED1 l\u01B0\u1EE3ng nh\xE3n trong m\xF4 h\xECnh c\u1EE7a m\xECnh:"),Aa.forEach(a),bt=u(n),g(Cs.$$.fragment,n),ot=u(n),g(Ts.$$.fragment,n),gt=u(n),Bn=e(n,"P",{});var dc=p(Bn);Ip=l(dc,"B\xE2y gi\u1EDD ch\xFAng ta th\u1EA5y v\u1EA5n \u0111\u1EC1: m\xF4 h\xECnh cho r\u1EB1ng ch\u1EC9 c\xF3 hai l\u1EDBp, nh\u01B0ng c\xE1c nh\xE3n t\u0103ng l\xEAn 2, c\xF3 ngh\u0129a l\xE0 th\u1EF1c t\u1EBF c\xF3 ba l\u1EDBp (v\xEC 0 c\u0169ng l\xE0 m\u1ED9t l\u1EDBp). \u0110\xE2y l\xE0 c\xE1ch ch\xFAng ta c\xF3 m\u1ED9t "),Bh=e(dc,"CODE",{});var li=p(Bh);Xp=l(li,"nan"),li.forEach(a),Jp=l(dc," - b\u1EB1ng c\xE1ch c\u1ED1 g\u1EAFng t\xEDnh to\xE1n m\u1EA5t m\xE1t cho m\u1ED9t l\u1EDBp kh\xF4ng t\u1ED3n t\u1EA1i! H\xE3y th\u1EED thay \u0111\u1ED5i \u0111i\u1EC1u \u0111\xF3 v\xE0 l\u1EAFp l\u1EA1i m\xF4 h\xECnh:"),dc.forEach(a),jt=u(n),g(xs.$$.fragment,n),ft=u(n),g(Ps.$$.fragment,n),vt=u(n),Sn=e(n,"P",{});var kc=p(Sn);Wp=l(kc,"Ch\xFAng ta \u0111ang hu\u1EA5n luy\u1EC7n! Kh\xF4ng c\xF2n "),Sh=e(kc,"CODE",{});var ti=p(Sh);Yp=l(ti,"nan"),ti.forEach(a),Zp=l(kc," n\u1EEFa, v\xE0 m\u1EA5t m\xE1t c\u1EE7a ch\xFAng ta \u0111ang gi\u1EA3m d\u1EA7n \u2026 \u0111\u1EA1i lo\u1EA1i v\u1EADy. N\u1EBFu b\u1EA1n quan s\xE1t n\xF3 m\u1ED9t l\xFAc, b\u1EA1n c\xF3 th\u1EC3 b\u1EAFt \u0111\u1EA7u h\u01A1i m\u1EA5t ki\xEAn nh\u1EABn, b\u1EDFi v\xEC gi\xE1 tr\u1ECB t\u1ED5n th\u1EA5t v\u1EABn \u1EDF m\u1EE9c cao. Ch\xFAng ta h\xE3y d\u1EEBng hu\u1EA5n luy\u1EC7n \u1EDF \u0111\xE2y v\xE0 th\u1EED ngh\u0129 xem \u0111i\u1EC1u g\xEC c\xF3 th\u1EC3 g\xE2y ra v\u1EA5n \u0111\u1EC1 n\xE0y. T\u1EA1i th\u1EDDi \u0111i\u1EC3m n\xE0y, ch\xFAng ta kh\xE1 ch\u1EAFc ch\u1EAFn r\u1EB1ng c\u1EA3 d\u1EEF li\u1EC7u v\xE0 m\xF4 h\xECnh \u0111\u1EC1u \u1ED5n, nh\u01B0ng m\xF4 h\xECnh c\u1EE7a ch\xFAng ta kh\xF4ng ho\u1EA1t \u0111\u1ED9ng t\u1ED1t. C\xF2n l\u1EA1i g\xEC n\u1EEFa? \u0110\u1EBFn l\xFAc \u0111\u1EC3\u2026"),kc.forEach(a),yt=u(n),on=e(n,"H3",{class:!0});var $c=p(on);Kn=e($c,"A",{id:!0,class:!0,href:!0});var ci=p(Kn);Kh=e(ci,"SPAN",{});var ei=p(Kh);g(Ns.$$.fragment,ei),ei.forEach(a),ci.forEach(a),Qp=u($c),zh=e($c,"SPAN",{});var pi=p(zh);nr=l(pi,"Ki\u1EC3m tra si\xEAu tham s\u1ED1 c\u1EE7a b\u1EA1n"),pi.forEach(a),$c.forEach(a),dt=u(n),sn=e(n,"P",{});var Da=p(sn);sr=l(Da,"N\u1EBFu b\u1EA1n nh\xECn l\u1EA1i \u0111o\u1EA1n m\xE3 \u1EDF tr\xEAn, b\u1EA1n c\xF3 th\u1EC3 kh\xF4ng nh\xECn th\u1EA5y b\u1EA5t k\u1EF3 si\xEAu tham s\u1ED1 n\xE0o, c\xF3 l\u1EBD ngo\u1EA1i tr\u1EEB "),Mh=e(Da,"CODE",{});var ri=p(Mh);ar=l(ri,"batch_size"),ri.forEach(a),hr=l(Da,", v\xE0 \u0111i\u1EC1u \u0111\xF3 d\u01B0\u1EDDng nh\u01B0 kh\xF4ng ph\u1EA3i l\xE0 th\u1EE7 ph\u1EA1m. Tuy nhi\xEAn, \u0111\u1EEBng \u0111\u1EC3 b\u1ECB l\u1EEBa; lu\xF4n c\xF3 si\xEAu tham s\u1ED1 v\xE0 n\u1EBFu b\u1EA1n kh\xF4ng th\u1EC3 nh\xECn th\u1EA5y ch\xFAng, \u0111i\u1EC1u \u0111\xF3 c\xF3 ngh\u0129a l\xE0 b\u1EA1n kh\xF4ng bi\u1EBFt ch\xFAng \u0111\u01B0\u1EE3c \u0111\u1EB7t th\xE0nh g\xEC. \u0110\u1EB7c bi\u1EC7t, h\xE3y nh\u1EDB m\u1ED9t \u0111i\u1EC1u quan tr\u1ECDng v\u1EC1 Keras: n\u1EBFu b\u1EA1n \u0111\u1EB7t h\xE0m m\u1EA5t m\xE1t, tr\xECnh t\u1ED1i \u01B0u h\xF3a ho\u1EB7c k\xEDch ho\u1EA1t b\u1EB1ng m\u1ED9t chu\u1ED7i, "),Vh=e(Da,"EM",{});var mi=p(Vh);lr=l(mi,"t\u1EA5t c\u1EA3 c\xE1c \u0111\u1ED1i s\u1ED1 c\u1EE7a n\xF3 s\u1EBD \u0111\u01B0\u1EE3c \u0111\u1EB7t th\xE0nh gi\xE1 tr\u1ECB m\u1EB7c \u0111\u1ECBnh c\u1EE7a ch\xFAng"),mi.forEach(a),tr=l(Da,". \u0110i\u1EC1u n\xE0y c\xF3 ngh\u0129a l\xE0 m\u1EB7c d\xF9 vi\u1EC7c s\u1EED d\u1EE5ng chu\u1ED7i k\xFD t\u1EF1 r\u1EA5t ti\u1EC7n l\u1EE3i, nh\u01B0ng b\u1EA1n n\xEAn h\u1EBFt s\u1EE9c c\u1EA9n th\u1EADn khi l\xE0m nh\u01B0 v\u1EADy, v\xEC n\xF3 c\xF3 th\u1EC3 d\u1EC5 d\xE0ng che gi\u1EA5u nh\u1EEFng th\u1EE9 quan tr\u1ECDng v\u1EDBi b\u1EA1n. (B\u1EA5t k\u1EF3 ai \u0111ang th\u1EED th\xE1ch th\u1EE9c t\xF9y ch\u1ECDn \u1EDF tr\xEAn n\xEAn l\u01B0u \xFD c\u1EA9n th\u1EADn v\u1EC1 th\u1EF1c t\u1EBF n\xE0y.)"),Da.forEach(a),kt=u(n),zn=e(n,"P",{});var _c=p(zn);cr=l(_c,"Trong tr\u01B0\u1EDDng h\u1EE3p n\xE0y, ch\xFAng ta \u0111\xE3 \u0111\u1EB7t tham s\u1ED1 b\u1EB1ng chu\u1ED7i \u1EDF \u0111\xE2u? Ban \u0111\u1EA7u, ch\xFAng ta \u0111\xE3 \u0111\u1EB7t gi\xE1 tr\u1ECB m\u1EA5t m\xE1t b\u1EB1ng m\u1ED9t chu\u1ED7i, nh\u01B0ng ch\xFAng ta kh\xF4ng l\xE0m \u0111i\u1EC1u \u0111\xF3 n\u1EEFa. Tuy nhi\xEAn, ch\xFAng ta \u0111ang thi\u1EBFt l\u1EADp tr\xECnh t\u1ED1i \u01B0u h\xF3a b\u1EB1ng m\u1ED9t chu\u1ED7i. \u0110i\u1EC1u \u0111\xF3 c\xF3 th\u1EC3 \u0111ang che gi\u1EA5u b\u1EA5t c\u1EE9 \u0111i\u1EC1u g\xEC v\u1EDBi m\xECnh? H\xE3y xem "),As=e(_c,"A",{href:!0,rel:!0});var ui=p(As);er=l(ui,"c\xE1c tham s\u1ED1 c\u1EE7a n\xF3"),ui.forEach(a),pr=l(_c,"."),_c.forEach(a),$t=u(n),an=e(n,"P",{});var Oa=p(an);rr=l(Oa,"C\xF3 g\xEC n\u1ED5i b\u1EADt \u1EDF \u0111\xE2y kh\xF4ng? \u0110\xFAng v\u1EADy - t\u1ED1c \u0111\u1ED9 h\u1ECDc! Khi ch\xFAng ta ch\u1EC9 s\u1EED d\u1EE5ng chu\u1ED7i "),Fh=e(Oa,"CODE",{});var ii=p(Fh);mr=l(ii,"'adam'"),ii.forEach(a),ur=l(Oa,", ch\xFAng ta s\u1EBD nh\u1EADn \u0111\u01B0\u1EE3c t\u1ED1c \u0111\u1ED9 h\u1ECDc m\u1EB7c \u0111\u1ECBnh, l\xE0 0.001 ho\u1EB7c 1e-3. \u0110\xE2y l\xE0 m\u1EE9c qu\xE1 cao \u0111\u1ED1i v\u1EDBi m\u1ED9t m\xF4 h\xECnh Transformer! N\xF3i chung, ch\xFAng t\xF4i khuy\xEAn b\u1EA1n n\xEAn th\u1EED t\u1ED1c \u0111\u1ED9 h\u1ECDc t\u1EEB 1e-5 \u0111\u1EBFn 1e-4 cho c\xE1c m\xF4 h\xECnh c\u1EE7a b\u1EA1n; \u0111\xF3 l\xE0 m\u1ED9t n\u01A1i n\xE0o \u0111\xF3 nh\u1ECF h\u01A1n t\u1EEB 10X \u0111\u1EBFn 100X so v\u1EDBi gi\xE1 tr\u1ECB m\xE0 ta th\u1EF1c s\u1EF1 \u0111ang s\u1EED d\u1EE5ng \u1EDF \u0111\xE2y. \u0110i\u1EC1u \u0111\xF3 nghe c\xF3 v\u1EBB nh\u01B0 n\xF3 c\xF3 th\u1EC3 l\xE0 m\u1ED9t v\u1EA5n \u0111\u1EC1 l\u1EDBn, v\xEC v\u1EADy h\xE3y th\u1EED gi\u1EA3m b\u1EDBt n\xF3. \u0110\u1EC3 l\xE0m \u0111i\u1EC1u \u0111\xF3, ch\xFAng ta c\u1EA7n nh\u1EADp v\xE0o \u0111\u1ED1i t\u01B0\u1EE3ng "),Hh=e(Oa,"CODE",{});var bi=p(Hh);ir=l(bi,"optimizer"),bi.forEach(a),br=l(Oa,". Trong khi ch\xFAng ta \u0111ang \u1EDF \u0111\xF3, h\xE3y b\u1EAFt \u0111\u1EA7u l\u1EA1i m\xF4 h\xECnh t\u1EEB checkpoint, trong tr\u01B0\u1EDDng h\u1EE3p hu\u1EA5n luy\u1EC7n v\u1EDBi t\u1ED1c \u0111\u1ED9 h\u1ECDc cao l\xE0m h\u1ECFng tr\u1ECDng s\u1ED1 c\u1EE7a n\xF3:"),Oa.forEach(a),_t=u(n),g(Ds.$$.fragment,n),Et=u(n),g(Mn.$$.fragment,n),wt=u(n),ua=e(n,"P",{});var oi=p(ua);or=l(oi,"B\xE2y gi\u1EDD, ch\xFAng t\xF4i c\xF3 th\u1EC3 th\u1EED \u0111i\u1EC1u ch\u1EC9nh m\xF4 h\xECnh v\u1EDBi t\u1ED1c \u0111\u1ED9 h\u1ECDc m\u1EDBi, \u0111\u01B0\u1EE3c c\u1EA3i thi\u1EC7n:"),oi.forEach(a),qt=u(n),g(Os.$$.fragment,n),Ct=u(n),g(Bs.$$.fragment,n),Tt=u(n),ia=e(n,"P",{});var gi=p(ia);gr=l(gi,"B\xE2y gi\u1EDD m\u1EA5t m\xE1t c\u1EE7a ch\xFAng ta th\u1EF1c s\u1EF1 \u0111i \u0111\xE2u \u0111\xF3! Vi\u1EC7c hu\u1EA5n luy\u1EC7n cu\u1ED1i c\xF9ng c\xF3 v\u1EBB nh\u01B0 n\xF3 \u0111\xE3 ho\u1EA1t \u0111\u1ED9ng. C\xF3 m\u1ED9t b\xE0i h\u1ECDc \u1EDF \u0111\xE2y: khi m\xF4 h\xECnh c\u1EE7a b\u1EA1n \u0111ang ch\u1EA1y nh\u01B0ng m\u1EE9c hao h\u1EE5t kh\xF4ng gi\u1EA3m v\xE0 b\u1EA1n ch\u1EAFc ch\u1EAFn r\u1EB1ng d\u1EEF li\u1EC7u c\u1EE7a m\xECnh v\u1EABn \u1ED5n, b\u1EA1n n\xEAn ki\u1EC3m tra c\xE1c si\xEAu tham s\u1ED1 nh\u01B0 t\u1ED1c \u0111\u1ED9 h\u1ECDc v\xE0 gi\u1EA3m tr\u1ECDng l\u01B0\u1EE3ng. \u0110\u1EB7t m\u1ED9t trong hai gi\xE1 tr\u1ECB \u0111\xF3 qu\xE1 cao r\u1EA5t c\xF3 th\u1EC3 khi\u1EBFn qu\xE1 tr\xECnh hu\u1EA5n luy\u1EC7n b\u1ECB \u201C\u0111\xECnh tr\u1EC7\u201D v\u1EDBi gi\xE1 tr\u1ECB t\u1ED5n th\u1EA5t cao."),gi.forEach(a),xt=u(n),gn=e(n,"H2",{class:!0});var Ec=p(gn);Vn=e(Ec,"A",{id:!0,class:!0,href:!0});var ji=p(Vn);Gh=e(ji,"SPAN",{});var fi=p(Gh);g(Ss.$$.fragment,fi),fi.forEach(a),ji.forEach(a),jr=u(Ec),Lh=e(Ec,"SPAN",{});var vi=p(Lh);fr=l(vi,"C\xE1c v\u1EA5n \u0111\u1EC1 ti\u1EC1m \u1EA9n kh\xE1c"),vi.forEach(a),Ec.forEach(a),Pt=u(n),ba=e(n,"P",{});var yi=p(ba);vr=l(yi,"Ch\xFAng ta \u0111\xE3 \u0111\u1EC1 c\u1EADp \u0111\u1EBFn c\xE1c v\u1EA5n \u0111\u1EC1 trong t\u1EADp l\u1EC7nh \u1EDF tr\xEAn, nh\u01B0ng c\xF3 m\u1ED9t s\u1ED1 l\u1ED7i ph\u1ED5 bi\u1EBFn kh\xE1c m\xE0 b\u1EA1n c\xF3 th\u1EC3 g\u1EB7p ph\u1EA3i. Ch\xFAng ta h\xE3y nh\xECn v\xE0o m\u1ED9t danh s\xE1ch (kh\xF4ng \u0111\u1EA7y \u0111\u1EE7 cho l\u1EAFm)."),yi.forEach(a),Nt=u(n),jn=e(n,"H3",{class:!0});var wc=p(jn);Fn=e(wc,"A",{id:!0,class:!0,href:!0});var di=p(Fn);Uh=e(di,"SPAN",{});var ki=p(Uh);g(Ks.$$.fragment,ki),ki.forEach(a),di.forEach(a),yr=u(wc),Rh=e(wc,"SPAN",{});var $i=p(Rh);dr=l($i,"X\u1EED l\xFD l\u1ED7i h\u1EBFt b\u1ED9 nh\u1EDB"),$i.forEach(a),wc.forEach(a),At=u(n),hn=e(n,"P",{});var Ba=p(hn);kr=l(Ba,"D\u1EA5u hi\u1EC7u cho bi\u1EBFt s\u1EAFp h\u1EBFt b\u1ED9 nh\u1EDB l\xE0 m\u1ED9t l\u1ED7i nh\u01B0 \u201COOM when allocating tensor\u201D  - OOM l\xE0 vi\u1EBFt t\u1EAFt c\u1EE7a \u201Ch\u1EBFt b\u1ED9 nh\u1EDB.\u201D \u0110\xE2y l\xE0 m\u1ED9t nguy c\u01A1 r\u1EA5t ph\u1ED5 bi\u1EBFn khi x\u1EED l\xFD c\xE1c m\xF4 h\xECnh ng\xF4n ng\u1EEF l\u1EDBn. N\u1EBFu b\u1EA1n g\u1EB7p ph\u1EA3i \u0111i\u1EC1u n\xE0y, m\u1ED9t chi\u1EBFn l\u01B0\u1EE3c t\u1ED1t l\xE0 gi\u1EA3m m\u1ED9t n\u1EEDa k\xEDch th\u01B0\u1EDBc l\xF4 c\u1EE7a b\u1EA1n v\xE0 th\u1EED l\u1EA1i. Tuy nhi\xEAn, h\xE3y nh\u1EDB r\u1EB1ng m\u1ED9t s\u1ED1 m\xF4 h\xECnh c\xF3 k\xEDch th\u01B0\u1EDBc "),Ih=e(Ba,"EM",{});var _i=p(Ih);$r=l(_i,"r\u1EA5t"),_i.forEach(a),_r=l(Ba," l\u1EDBn. V\xED d\u1EE5: GPT-2 k\xEDch th\u01B0\u1EDBc \u0111\u1EA7y \u0111\u1EE7 c\xF3 th\xF4ng s\u1ED1 1.5B, c\xF3 ngh\u0129a l\xE0 b\u1EA1n s\u1EBD c\u1EA7n 6GB b\u1ED9 nh\u1EDB ch\u1EC9 \u0111\u1EC3 l\u01B0u m\xF4 h\xECnh v\xE0 6GB kh\xE1c cho \u0111\u1ED9 d\u1ED1c c\u1EE7a n\xF3! Hu\u1EA5n luy\u1EC7n m\xF4 h\xECnh GPT-2 \u0111\u1EA7y \u0111\u1EE7 th\u01B0\u1EDDng s\u1EBD y\xEAu c\u1EA7u h\u01A1n 20GB VRAM b\u1EA5t k\u1EC3 b\u1EA1n s\u1EED d\u1EE5ng k\xEDch th\u01B0\u1EDBc l\xF4 n\xE0o, \u0111i\u1EC1u m\xE0 ch\u1EC9 m\u1ED9t s\u1ED1 GPU c\xF3. C\xE1c m\xF4 h\xECnh nh\u1EB9 h\u01A1n nh\u01B0 "),Xh=e(Ba,"CODE",{});var Ei=p(Xh);Er=l(Ei,"distilbert-base-cased"),Ei.forEach(a),wr=l(Ba,"  d\u1EC5 ch\u1EA1y h\u01A1n nhi\u1EC1u v\xE0 hu\u1EA5n luy\u1EC7n c\u0169ng nhanh h\u01A1n nhi\u1EC1u."),Ba.forEach(a),Dt=u(n),g(Hn.$$.fragment,n),Ot=u(n),fn=e(n,"H3",{class:!0});var qc=p(fn);Gn=e(qc,"A",{id:!0,class:!0,href:!0});var wi=p(Gn);Jh=e(wi,"SPAN",{});var qi=p(Jh);g(zs.$$.fragment,qi),qi.forEach(a),wi.forEach(a),qr=u(qc),Wh=e(qc,"SPAN",{});var Ci=p(Wh);Cr=l(Ci,"TensorFlow \u0111\xF3i r\u1ED3i \u0111\xF3i r\u1ED3i\u{1F99B}"),Ci.forEach(a),qc.forEach(a),Bt=u(n),ln=e(n,"P",{});var Sa=p(ln);Tr=l(Sa,"M\u1ED9t \u0111i\u1EC3m \u0111\u1EB7c bi\u1EC7t c\u1EE7a TensorFlow m\xE0 b\u1EA1n n\xEAn bi\u1EBFt l\xE0 n\xF3 ph\xE2n b\u1ED5 "),Yh=e(Sa,"EM",{});var Ti=p(Yh);xr=l(Ti,"t\u1EA5t c\u1EA3"),Ti.forEach(a),Pr=l(Sa," b\u1ED9 nh\u1EDB GPU c\u1EE7a b\u1EA1n cho ch\xEDnh n\xF3 ngay khi b\u1EA1n t\u1EA3i m\u1ED9t m\xF4 h\xECnh ho\u1EB7c th\u1EF1c hi\u1EC7n b\u1EA5t k\u1EF3 hu\u1EA5n luy\u1EC7n n\xE0o v\xE0 sau \u0111\xF3 n\xF3 s\u1EBD ph\xE2n chia b\u1ED9 nh\u1EDB \u0111\xF3 theo y\xEAu c\u1EA7u. \u0110i\u1EC1u n\xE0y kh\xE1c v\u1EDBi h\xE0nh vi c\u1EE7a c\xE1c khung kh\xE1c, nh\u01B0 PyTorch, ph\xE2n b\u1ED5 b\u1ED9 nh\u1EDB theo y\xEAu c\u1EA7u v\u1EDBi CUDA thay v\xEC th\u1EF1c hi\u1EC7n n\xF3 trong n\u1ED9i b\u1ED9. M\u1ED9t \u01B0u \u0111i\u1EC3m c\u1EE7a ph\u01B0\u01A1ng ph\xE1p TensorFlow l\xE0 n\xF3 th\u01B0\u1EDDng c\xF3 th\u1EC3 \u0111\u01B0a ra c\xE1c l\u1ED7i h\u1EEFu \xEDch khi b\u1EA1n h\u1EBFt b\u1ED9 nh\u1EDB v\xE0 n\xF3 c\xF3 th\u1EC3 ph\u1EE5c h\u1ED3i t\u1EEB tr\u1EA1ng th\xE1i \u0111\xF3 m\xE0 kh\xF4ng l\xE0m h\u1ECFng to\xE0n b\u1ED9 nh\xE2n CUDA. Nh\u01B0ng c\u0169ng c\xF3 m\u1ED9t nh\u01B0\u1EE3c \u0111i\u1EC3m quan tr\u1ECDng: n\u1EBFu b\u1EA1n ch\u1EA1y hai ti\u1EBFn tr\xECnh TensorFlow c\xF9ng m\u1ED9t l\xFAc, th\xEC "),Zh=e(Sa,"STRONG",{});var xi=p(Zh);Nr=l(xi,"b\u1EA1n s\u1EBD c\xF3 m\u1ED9t kho\u1EA3ng th\u1EDDi gian t\u1ED3i t\u1EC7"),xi.forEach(a),Ar=l(Sa,"."),Sa.forEach(a),St=u(n),oa=e(n,"P",{});var Pi=p(oa);Dr=l(Pi,"N\u1EBFu b\u1EA1n \u0111ang ch\u1EA1y tr\xEAn Colab, b\u1EA1n kh\xF4ng c\u1EA7n ph\u1EA3i lo l\u1EAFng v\u1EC1 \u0111i\u1EC1u n\xE0y, nh\u01B0ng n\u1EBFu b\u1EA1n \u0111ang ch\u1EA1y c\u1EE5c b\u1ED9 th\xEC \u0111\xE2y ch\u1EAFc ch\u1EAFn l\xE0 \u0111i\u1EC1u b\u1EA1n n\xEAn c\u1EA9n th\u1EADn. \u0110\u1EB7c bi\u1EC7t, h\xE3y l\u01B0u \xFD r\u1EB1ng vi\u1EC7c \u0111\xF3ng m\u1ED9t tab s\u1ED5 ghi ch\xE9p kh\xF4ng nh\u1EA5t thi\u1EBFt ph\u1EA3i \u0111\xF3ng notebook \u0111\xF3 l\u1EA1i! B\u1EA1n c\xF3 th\u1EC3 c\u1EA7n ch\u1ECDn notebok \u0111ang ch\u1EA1y (notebook c\xF3 bi\u1EC3u t\u01B0\u1EE3ng m\xE0u xanh l\xE1 c\xE2y) v\xE0 t\u1EAFt ch\xFAng theo c\xE1ch th\u1EE7 c\xF4ng trong danh s\xE1ch th\u01B0 m\u1EE5c. B\u1EA5t k\u1EF3 notebook \u0111ang ch\u1EA1y n\xE0o \u0111ang s\u1EED d\u1EE5ng TensorFlow v\u1EABn c\xF3 th\u1EC3 \u0111ang gi\u1EEF m\u1ED9t lo\u1EA1t b\u1ED9 nh\u1EDB GPU c\u1EE7a b\u1EA1n v\xE0 \u0111i\u1EC1u \u0111\xF3 c\xF3 ngh\u0129a l\xE0 b\u1EA5t k\u1EF3 notebook m\u1EDBi n\xE0o b\u1EA1n b\u1EAFt \u0111\u1EA7u \u0111\u1EC1u c\xF3 th\u1EC3 g\u1EB7p ph\u1EA3i m\u1ED9t s\u1ED1 v\u1EA5n \u0111\u1EC1 r\u1EA5t k\u1EF3 qu\u1EB7c."),Pi.forEach(a),Kt=u(n),Ln=e(n,"P",{});var Cc=p(Ln);Or=l(Cc,"N\u1EBFu b\u1EA1n b\u1EAFt \u0111\u1EA7u g\u1EB7p l\u1ED7i v\u1EC1 CUDA, BLAS ho\u1EB7c cuBLAS trong m\xE3 ho\u1EA1t \u0111\u1ED9ng tr\u01B0\u1EDBc \u0111\xF3, \u0111\xE2y r\u1EA5t th\u01B0\u1EDDng l\xE0 th\u1EE7 ph\u1EA1m. B\u1EA1n c\xF3 th\u1EC3 s\u1EED d\u1EE5ng m\u1ED9t l\u1EC7nh nh\u01B0 "),Qh=e(Cc,"CODE",{});var Ni=p(Qh);Br=l(Ni,"nvidia-smi"),Ni.forEach(a),Sr=l(Cc," \u0111\u1EC3 ki\u1EC3m tra - khi b\u1EA1n t\u1EAFt ho\u1EB7c kh\u1EDFi \u0111\u1ED9ng l\u1EA1i notebook hi\u1EC7n t\u1EA1i c\u1EE7a m\xECnh, b\u1ED9 nh\u1EDB c\u1EE7a b\u1EA1n c\xF2n tr\u1ED1ng hay v\u1EABn c\xF2n s\u1EED d\u1EE5ng \u0111\u01B0\u1EE3c? N\u1EBFu n\xF3 v\u1EABn c\xF2n \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng, m\u1ED9t c\xE1i g\xEC \u0111\xF3 kh\xE1c \u0111ang gi\u1EEF n\xF3!"),Cc.forEach(a),zt=u(n),vn=e(n,"H3",{class:!0});var Tc=p(vn);Un=e(Tc,"A",{id:!0,class:!0,href:!0});var Ai=p(Un);nl=e(Ai,"SPAN",{});var Di=p(nl);g(Ms.$$.fragment,Di),Di.forEach(a),Ai.forEach(a),Kr=u(Tc),sl=e(Tc,"SPAN",{});var Oi=p(sl);zr=l(Oi,"Ki\u1EC3m tra l\u1EA1i d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n (m\u1ED9t l\u1EA7n n\u1EEFa!)"),Oi.forEach(a),Tc.forEach(a),Mt=u(n),O=e(n,"P",{});var cn=p(O);Mr=l(cn,"M\xF4 h\xECnh c\u1EE7a b\u1EA1n s\u1EBD ch\u1EC9 h\u1ECDc \u0111\u01B0\u1EE3c \u0111i\u1EC1u g\xEC \u0111\xF3 n\u1EBFu n\xF3 th\u1EF1c s\u1EF1 c\xF3 th\u1EC3 h\u1ECDc \u0111\u01B0\u1EE3c b\u1EA5t c\u1EE9 \u0111i\u1EC1u g\xEC t\u1EEB d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n. N\u1EBFu c\xF3 l\u1ED7i l\xE0m h\u1ECFng d\u1EEF li\u1EC7u ho\u1EB7c c\xE1c nh\xE3n \u0111\u01B0\u1EE3c g\xE1n ng\u1EABu nhi\xEAn, r\u1EA5t c\xF3 th\u1EC3 b\u1EA1n s\u1EBD kh\xF4ng hu\u1EA5n luy\u1EC7n \u0111\u01B0\u1EE3c m\xF4 h\xECnh n\xE0o v\u1EC1 t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a m\xECnh. M\u1ED9t c\xF4ng c\u1EE5 h\u1EEFu \xEDch \u1EDF \u0111\xE2y l\xE0 "),al=e(cn,"CODE",{});var Bi=p(al);Vr=l(Bi,"tokenizer.decode()"),Bi.forEach(a),Fr=l(cn,". Thao t\xE1c n\xE0y s\u1EBD bi\u1EBFn "),hl=e(cn,"CODE",{});var Si=p(hl);Hr=l(Si,"input_ids"),Si.forEach(a),Gr=l(cn," tr\u1EDF l\u1EA1i th\xE0nh chu\u1ED7i, v\xEC v\u1EADy b\u1EA1n c\xF3 th\u1EC3 xem d\u1EEF li\u1EC7u v\xE0 xem li\u1EC7u d\u1EEF li\u1EC7u hu\u1EA5n luy\u1EC7n c\u1EE7a b\u1EA1n c\xF3 \u0111ang d\u1EA1y nh\u1EEFng g\xEC b\u1EA1n mu\u1ED1n n\xF3 d\u1EA1y hay kh\xF4ng. V\xED d\u1EE5: sau khi b\u1EA1n nh\u1EADn \u0111\u01B0\u1EE3c m\u1ED9t "),ll=e(cn,"CODE",{});var Ki=p(ll);Lr=l(Ki,"batch"),Ki.forEach(a),Ur=l(cn," t\u1EEB "),tl=e(cn,"CODE",{});var zi=p(tl);Rr=l(zi,"tf.data.Dataset"),zi.forEach(a),Ir=l(cn," nh\u01B0 ch\xFAng ta \u0111\xE3 l\xE0m \u1EDF tr\xEAn, b\u1EA1n c\xF3 th\u1EC3 gi\u1EA3i m\xE3 ph\u1EA7n t\u1EED \u0111\u1EA7u ti\xEAn nh\u01B0 sau:"),cn.forEach(a),Vt=u(n),g(Vs.$$.fragment,n),Ft=u(n),ga=e(n,"P",{});var Mi=p(ga);Xr=l(Mi,"Then you can compare it with the first label, like so:"),Mi.forEach(a),Ht=u(n),g(Fs.$$.fragment,n),Gt=u(n),ja=e(n,"P",{});var Vi=p(ja);Jr=l(Vi,"Khi b\u1EA1n c\xF3 th\u1EC3 xem d\u1EEF li\u1EC7u c\u1EE7a m\xECnh nh\u01B0 th\u1EBF n\xE0y, b\u1EA1n c\xF3 th\u1EC3 t\u1EF1 h\u1ECFi b\u1EA3n th\xE2n nh\u1EEFng c\xE2u h\u1ECFi sau:"),Vi.forEach(a),Lt=u(n),V=e(n,"UL",{});var as=p(V);cl=e(as,"LI",{});var Fi=p(cl);Wr=l(Fi,"D\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c gi\u1EA3i m\xE3 c\xF3 d\u1EC5 hi\u1EC3u kh\xF4ng?"),Fi.forEach(a),Yr=u(as),el=e(as,"LI",{});var Hi=p(el);Zr=l(Hi,"B\u1EA1n c\xF3 \u0111\u1ED3ng \xFD v\u1EDBi c\xE1c nh\xE3n?"),Hi.forEach(a),Qr=u(as),pl=e(as,"LI",{});var Gi=p(pl);nm=l(Gi,"C\xF3 m\u1ED9t nh\xE3n n\xE0o ph\u1ED5 bi\u1EBFn h\u01A1n nh\u1EEFng nh\xE3n kh\xE1c kh\xF4ng?"),Gi.forEach(a),sm=u(as),rl=e(as,"LI",{});var Li=p(rl);am=l(Li,"M\u1EA5t m\xE1t/Ch\u1EC9 s\u1ED1 s\u1EBD l\xE0 bao nhi\xEAu n\u1EBFu m\xF4 h\xECnh d\u1EF1 \u0111o\xE1n m\u1ED9t c\xE2u tr\u1EA3 l\u1EDDi ng\u1EABu nhi\xEAn/lu\xF4n l\xE0 m\u1ED9t c\xE2u tr\u1EA3 l\u1EDDi gi\u1ED1ng nhau?"),Li.forEach(a),as.forEach(a),Ut=u(n),fa=e(n,"P",{});var Ui=p(fa);hm=l(Ui,"Sau khi xem x\xE9t d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n, h\xE3y xem qua m\u1ED9t s\u1ED1 d\u1EF1 \u0111o\xE1n c\u1EE7a m\xF4 h\xECnh - n\u1EBFu m\xF4 h\xECnh c\u1EE7a b\u1EA1n xu\u1EA5t ra c\xE1c token, h\xE3y th\u1EED gi\u1EA3i m\xE3 ch\xFAng! N\u1EBFu m\xF4 h\xECnh lu\xF4n d\u1EF1 \u0111o\xE1n c\xF9ng m\u1ED9t \u0111i\u1EC1u th\xEC \u0111\xF3 c\xF3 th\u1EC3 l\xE0 do t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n thi\xEAn v\u1EC1 m\u1ED9t lo\u1EA1i (\u0111\u1ED1i v\u1EDBi c\xE1c v\u1EA5n \u0111\u1EC1 ph\xE2n lo\u1EA1i), v\xEC v\u1EADy c\xE1c k\u1EF9 thu\u1EADt nh\u01B0 l\u1EA5y m\u1EABu qu\xE1 m\u1EE9c c\xE1c l\u1EDBp hi\u1EBFm c\xF3 th\u1EC3 h\u1EEFu \xEDch. Ngo\xE0i ra, \u0111i\u1EC1u n\xE0y c\u0169ng c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c g\xE2y ra b\u1EDFi c\xE1c v\u1EA5n \u0111\u1EC1 hu\u1EA5n luy\u1EC7n nh\u01B0 c\xE0i \u0111\u1EB7t si\xEAu tham s\u1ED1 t\u1EC7."),Ui.forEach(a),Rt=u(n),va=e(n,"P",{});var Ri=p(va);lm=l(Ri,"N\u1EBFu ph\u1EA7n m\u1EA5t m\xE1t/ c\xE1c ch\u1EC9 s\u1ED1 b\u1EA1n nh\u1EADn \u0111\u01B0\u1EE3c tr\xEAn m\xF4 h\xECnh ban \u0111\u1EA7u c\u1EE7a m\xECnh tr\u01B0\u1EDBc khi hu\u1EA5n luy\u1EC7n r\u1EA5t kh\xE1c v\u1EDBi c\xE1i b\u1EA1n mong \u0111\u1EE3i cho c\xE1c d\u1EF1 \u0111o\xE1n ng\u1EABu nhi\xEAn, h\xE3y ki\u1EC3m tra k\u1EF9 c\xE1ch t\xEDnh to\xE1n m\u1EA5t m\xE1t ho\u1EB7c ch\u1EC9 s\u1ED1 c\u1EE7a b\u1EA1n, v\xEC c\xF3 th\u1EC3 c\xF3 m\u1ED9t l\u1ED7i \u1EDF \u0111\xF3. N\u1EBFu b\u1EA1n \u0111ang s\u1EED d\u1EE5ng m\u1ED9t s\u1ED1 kho\u1EA3ng m\u1EA5t m\xE1t m\xE0 b\u1EA1n th\xEAm v\xE0o cu\u1ED1i, h\xE3y \u0111\u1EA3m b\u1EA3o r\u1EB1ng ch\xFAng c\xF3 c\xF9ng quy m\xF4."),Ri.forEach(a),It=u(n),ya=e(n,"P",{});var Ii=p(ya);tm=l(Ii,"Khi b\u1EA1n ch\u1EAFc ch\u1EAFn d\u1EEF li\u1EC7u c\u1EE7a m\xECnh l\xE0 ho\xE0n h\u1EA3o, b\u1EA1n c\xF3 th\u1EC3 xem li\u1EC7u m\xF4 h\xECnh c\xF3 kh\u1EA3 n\u0103ng hu\u1EA5n luy\u1EC7n v\u1EC1 n\xF3 hay kh\xF4ng b\u1EB1ng m\u1ED9t b\xE0i ki\u1EC3m tra \u0111\u01A1n gi\u1EA3n."),Ii.forEach(a),Xt=u(n),yn=e(n,"H3",{class:!0});var xc=p(yn);Rn=e(xc,"A",{id:!0,class:!0,href:!0});var Xi=p(Rn);ml=e(Xi,"SPAN",{});var Ji=p(ml);g(Hs.$$.fragment,Ji),Ji.forEach(a),Xi.forEach(a),cm=u(xc),ul=e(xc,"SPAN",{});var Wi=p(ul);em=l(Wi,"H\u1ECDc k\u0129 m\xF4 h\xECnh c\u1EE7a b\u1EA1n trong m\u1ED9t l\xF4"),Wi.forEach(a),xc.forEach(a),Jt=u(n),da=e(n,"P",{});var Yi=p(da);pm=l(Yi,"Vi\u1EC7c h\u1ECDc qu\xE1 nhi\u1EC1u th\u01B0\u1EDDng l\xE0 \u0111i\u1EC1u ch\xFAng ta c\u1ED1 g\u1EAFng tr\xE1nh khi hu\u1EA5n luy\u1EC7n, v\xEC n\xF3 c\xF3 ngh\u0129a l\xE0 m\xF4 h\xECnh kh\xF4ng h\u1ECDc c\xE1ch nh\u1EADn ra c\xE1c \u0111\u1EB7c \u0111i\u1EC3m chung ta mu\u1ED1n m\xE0 thay v\xE0o \u0111\xF3 ch\u1EC9 l\xE0 ghi nh\u1EDB c\xE1c m\u1EABu hu\u1EA5n luy\u1EC7n. Tuy nhi\xEAn, c\u1ED1 g\u1EAFng hu\u1EA5n luy\u1EC7n m\xF4 h\xECnh c\u1EE7a b\u1EA1n l\u1EB7p \u0111i l\u1EB7p l\u1EA1i l\xE0 m\u1ED9t b\xE0i ki\u1EC3m tra t\u1ED1t \u0111\u1EC3 ki\u1EC3m tra xem v\u1EA5n \u0111\u1EC1 nh\u01B0 b\u1EA1n \u0111\xE3 \u0111\u1ECBnh h\xECnh c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c gi\u1EA3i quy\u1EBFt b\u1EB1ng m\xF4 h\xECnh m\xE0 b\u1EA1n \u0111ang c\u1ED1 g\u1EAFng hu\u1EA5n luy\u1EC7n hay kh\xF4ng. N\xF3 c\u0169ng s\u1EBD gi\xFAp b\u1EA1n xem li\u1EC7u t\u1ED1c \u0111\u1ED9 h\u1ECDc ban \u0111\u1EA7u c\u1EE7a b\u1EA1n c\xF3 qu\xE1 cao hay kh\xF4ng."),Yi.forEach(a),Wt=u(n),tn=e(n,"P",{});var Ka=p(tn);rm=l(Ka,"Th\u1EF1c hi\u1EC7n \u0111i\u1EC1u n\xE0y khi b\u1EA1n \u0111\xE3 x\xE1c \u0111\u1ECBnh \u0111\u01B0\u1EE3c "),il=e(Ka,"CODE",{});var Zi=p(il);mm=l(Zi,"model"),Zi.forEach(a),um=l(Ka," c\u1EE7a m\xECnh th\u1EF1c s\u1EF1 d\u1EC5 d\xE0ng; ch\u1EC9 c\u1EA7n l\u1EA5y m\u1ED9t lo\u1EA1t d\u1EEF li\u1EC7u hu\u1EA5n luy\u1EC7n, sau \u0111\xF3 coi "),bl=e(Ka,"CODE",{});var Qi=p(bl);im=l(Qi,"batch"),Qi.forEach(a),bm=l(Ka," \u0111\xF3 l\xE0 to\xE0n b\u1ED9 t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n, \u0111\u01B0a n\xF3 v\xE0o m\xF4 h\xECnh v\u1EDBi m\u1ED9t l\u01B0\u1EE3ng epoch l\u1EDBn:"),Ka.forEach(a),Yt=u(n),g(Gs.$$.fragment,n),Zt=u(n),g(In.$$.fragment,n),Qt=u(n),Xn=e(n,"P",{});var Pc=p(Xn);om=l(Pc,"M\xF4 h\xECnh ph\u1EA3i c\xF3 k\u1EBFt qu\u1EA3 g\u1EA7n nh\u01B0 ho\xE0n h\u1EA3o tr\xEAn "),ol=e(Pc,"CODE",{});var n0=p(ol);gm=l(n0,"batch"),n0.forEach(a),jm=l(Pc,", v\u1EDBi m\u1EE9c m\u1EA5t m\xE1t gi\u1EA3m nhanh v\u1EC1 0 (ho\u1EB7c gi\xE1 tr\u1ECB t\u1ED1i thi\u1EC3u cho kho\u1EA3n m\u1EA5t m\xE1t b\u1EA1n \u0111ang s\u1EED d\u1EE5ng)."),Pc.forEach(a),nc=u(n),ka=e(n,"P",{});var s0=p(ka);fm=l(s0,"N\u1EBFu b\u1EA1n kh\xF4ng qu\u1EA3n l\xFD \u0111\u1EC3 m\xF4 h\xECnh c\u1EE7a m\xECnh c\xF3 \u0111\u01B0\u1EE3c k\u1EBFt qu\u1EA3 ho\xE0n h\u1EA3o nh\u01B0 th\u1EBF n\xE0y, \u0111i\u1EC1u \u0111\xF3 c\xF3 ngh\u0129a l\xE0 c\xF3 \u0111i\u1EC1u g\xEC \u0111\xF3 kh\xF4ng \u1ED5n trong c\xE1ch b\u1EA1n \u0111\u1ECBnh khung v\u1EA5n \u0111\u1EC1 ho\u1EB7c d\u1EEF li\u1EC7u c\u1EE7a m\xECnh, v\xEC v\u1EADy b\u1EA1n n\xEAn kh\u1EAFc ph\u1EE5c \u0111i\u1EC1u \u0111\xF3. Ch\u1EC9 khi b\u1EA1n v\u01B0\u1EE3t qua \u0111\u01B0\u1EE3c b\xE0i ki\u1EC3m tra overfit, b\u1EA1n m\u1EDBi c\xF3 th\u1EC3 ch\u1EAFc ch\u1EAFn r\u1EB1ng m\xF4 h\xECnh c\u1EE7a m\xECnh th\u1EF1c s\u1EF1 c\xF3 th\u1EC3 h\u1ECDc \u0111\u01B0\u1EE3c \u0111i\u1EC1u g\xEC \u0111\xF3."),s0.forEach(a),sc=u(n),g(Jn.$$.fragment,n),ac=u(n),dn=e(n,"H3",{class:!0});var Nc=p(dn);Wn=e(Nc,"A",{id:!0,class:!0,href:!0});var a0=p(Wn);gl=e(a0,"SPAN",{});var h0=p(gl);g(Ls.$$.fragment,h0),h0.forEach(a),a0.forEach(a),vm=u(Nc),jl=e(Nc,"SPAN",{});var l0=p(jl);ym=l(l0,"Kh\xF4ng \u0111i\u1EC1u ch\u1EC9nh b\u1EA5t c\u1EE9 th\u1EE9 g\xEC cho \u0111\u1EBFn khi b\u1EA1n c\xF3 m\xF4 h\xECnh c\u01A1 s\u1EDF \u0111\u1EA7u ti\xEAn"),l0.forEach(a),Nc.forEach(a),hc=u(n),Yn=e(n,"P",{});var Ac=p(Yn);dm=l(Ac,"\u0110i\u1EC1u ch\u1EC9nh si\xEAu tham s\u1ED1 lu\xF4n \u0111\u01B0\u1EE3c nh\u1EA5n m\u1EA1nh l\xE0 ph\u1EA7n kh\xF3 nh\u1EA5t c\u1EE7a h\u1ECDc m\xE1y, nh\u01B0ng n\xF3 ch\u1EC9 l\xE0 b\u01B0\u1EDBc cu\u1ED1i c\xF9ng gi\xFAp b\u1EA1n hi\u1EC3u \u0111\u01B0\u1EE3c m\u1ED9t ch\xFAt v\u1EC1 ch\u1EC9 s\u1ED1 n\xE0y. "),fl=e(Ac,"EM",{});var t0=p(fl);km=l(t0,"C\xE1c gi\xE1 tr\u1ECB r\u1EA5t kh\xF4ng t\u1ED1t"),t0.forEach(a),$m=l(Ac," cho c\xE1c si\xEAu tham s\u1ED1 c\u1EE7a b\u1EA1n, ch\u1EB3ng h\u1EA1n nh\u01B0 s\u1EED d\u1EE5ng t\u1ED1c \u0111\u1ED9 h\u1ECDc Adam m\u1EB7c \u0111\u1ECBnh l\xE0 1e-3 v\u1EDBi m\xF4 h\xECnh Transformer, t\u1EA5t nhi\xEAn s\u1EBD khi\u1EBFn vi\u1EC7c h\u1ECDc ti\u1EBFn h\xE0nh r\u1EA5t ch\u1EADm ho\u1EB7c ho\xE0n to\xE0n b\u1ECB \u0111\xECnh tr\u1EC7, nh\u01B0ng h\u1EA7u h\u1EBFt th\u1EDDi gian l\xE0 c\xE1c si\xEAu tham s\u1ED1 \u201Ch\u1EE3p l\xFD\u201D, nh\u01B0 t\u1ED1c \u0111\u1ED9 h\u1ECDc t\u1EEB 1e-5 \u0111\u1EBFn 5e-5, s\u1EBD ho\u1EA1t \u0111\u1ED9ng t\u1ED1t \u0111\u1EC3 mang l\u1EA1i cho b\u1EA1n k\u1EBFt qu\u1EA3 t\u1ED1t. V\xEC v\u1EADy \u0111\u1EEBng kh\u1EDFi ch\u1EA1y t\xECm ki\u1EBFm si\xEAu tham s\u1ED1 t\u1ED1n th\u1EDDi gian v\xE0 t\u1ED1n k\xE9m cho \u0111\u1EBFn khi b\u1EA1n c\xF3 th\u1EE9 g\xEC \u0111\xF3 v\u01B0\u1EE3t qua m\xF4 h\xECnh c\u01A1 s\u1EDF m\xE0 b\u1EA1n c\xF3 tr\xEAn t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a m\xECnh."),Ac.forEach(a),lc=u(n),$a=e(n,"P",{});var c0=p($a);_m=l(c0,"Khi b\u1EA1n \u0111\xE3 c\xF3 m\u1ED9t m\xF4 h\xECnh \u0111\u1EE7 t\u1ED1t, b\u1EA1n c\xF3 th\u1EC3 b\u1EAFt \u0111\u1EA7u \u0111i\u1EC1u ch\u1EC9nh m\u1ED9t ch\xFAt. \u0110\u1EEBng th\u1EED kh\u1EDFi ch\u1EA1y m\u1ED9t ngh\xECn l\u1EA7n ch\u1EA1y v\u1EDBi c\xE1c si\xEAu tham s\u1ED1 kh\xE1c nhau, nh\u01B0ng h\xE3y so s\xE1nh m\u1ED9t v\xE0i l\u1EA7n ch\u1EA1y v\u1EDBi c\xE1c gi\xE1 tr\u1ECB kh\xE1c nhau cho m\u1ED9t si\xEAu th\xF4ng s\u1ED1 \u0111\u1EC3 c\xF3 \u0111\u01B0\u1EE3c \xFD t\u01B0\u1EDFng v\u1EC1 gi\xE1 tr\u1ECB n\xE0o c\xF3 t\xE1c \u0111\u1ED9ng l\u1EDBn nh\u1EA5t."),c0.forEach(a),tc=u(n),_a=e(n,"P",{});var e0=p(_a);Em=l(e0,"N\u1EBFu b\u1EA1n \u0111ang \u0111i\u1EC1u ch\u1EC9nh ch\xEDnh m\xF4 h\xECnh, h\xE3y gi\u1EEF n\xF3 \u0111\u01A1n gi\u1EA3n v\xE0 \u0111\u1EEBng th\u1EED b\u1EA5t c\u1EE9 \u0111i\u1EC1u g\xEC m\xE0 b\u1EA1n kh\xF4ng th\u1EC3 bi\u1EC7n minh m\u1ED9t c\xE1ch h\u1EE3p l\xFD. Lu\xF4n \u0111\u1EA3m b\u1EA3o r\u1EB1ng b\u1EA1n quay l\u1EA1i ki\u1EC3m tra overfit \u0111\u1EC3 x\xE1c minh r\u1EB1ng thay \u0111\u1ED5i c\u1EE7a b\u1EA1n kh\xF4ng g\xE2y ra b\u1EA5t k\u1EF3 h\u1EADu qu\u1EA3 ngo\xE0i \xFD mu\u1ED1n n\xE0o."),e0.forEach(a),cc=u(n),kn=e(n,"H3",{class:!0});var Dc=p(kn);Zn=e(Dc,"A",{id:!0,class:!0,href:!0});var p0=p(Zn);vl=e(p0,"SPAN",{});var r0=p(vl);g(Us.$$.fragment,r0),r0.forEach(a),p0.forEach(a),wm=u(Dc),yl=e(Dc,"SPAN",{});var m0=p(yl);qm=l(m0,"Y\xEAu c\u1EA7u gi\xFAp \u0111\u1EE1"),m0.forEach(a),Dc.forEach(a),ec=u(n),Qn=e(n,"P",{});var Oc=p(Qn);Cm=l(Oc,"Hy v\u1ECDng r\u1EB1ng b\u1EA1n s\u1EBD t\xECm th\u1EA5y m\u1ED9t s\u1ED1 l\u1EDDi khuy\xEAn trong ph\u1EA7n n\xE0y \u0111\u1EC3 gi\xFAp b\u1EA1n gi\u1EA3i quy\u1EBFt v\u1EA5n \u0111\u1EC1 c\u1EE7a m\xECnh, nh\u01B0ng n\u1EBFu kh\xF4ng ph\u1EA3i v\u1EADy, h\xE3y nh\u1EDB r\u1EB1ng b\u1EA1n lu\xF4n c\xF3 th\u1EC3 h\u1ECFi c\u1ED9ng \u0111\u1ED3ng tr\xEAn "),Rs=e(Oc,"A",{href:!0,rel:!0});var u0=p(Rs);Tm=l(u0,"di\u1EC5n \u0111\xE0n"),u0.forEach(a),xm=l(Oc,"."),Oc.forEach(a),pc=u(n),Ea=e(n,"P",{});var i0=p(Ea);Pm=l(i0,"D\u01B0\u1EDBi \u0111\xE2y l\xE0 m\u1ED9t s\u1ED1 t\xE0i li\u1EC7u b\u1ED5 sung c\xF3 th\u1EC3 h\u1EEFu \xEDch:"),i0.forEach(a),rc=u(n),F=e(n,"UL",{});var hs=p(F);wa=e(hs,"LI",{});var Lm=p(wa);Is=e(Lm,"A",{href:!0,rel:!0});var b0=p(Is);Nm=l(b0,"\u201CReproducibility as a vehicle for engineering best practices\u201D"),b0.forEach(a),Am=l(Lm," b\u1EDFi Joel Grus"),Lm.forEach(a),Dm=u(hs),qa=e(hs,"LI",{});var Um=p(qa);Xs=e(Um,"A",{href:!0,rel:!0});var o0=p(Xs);Om=l(o0,"\u201CChecklist for debugging neural networks\u201D"),o0.forEach(a),Bm=l(Um," b\u1EDFi Cecelia Shao"),Um.forEach(a),Sm=u(hs),Ca=e(hs,"LI",{});var Rm=p(Ca);Js=e(Rm,"A",{href:!0,rel:!0});var g0=p(Js);Km=l(g0,"\u201CHow to unit test machine learning code\u201D"),g0.forEach(a),zm=l(Rm," b\u1EDFi Chase Roberts"),Rm.forEach(a),Mm=u(hs),Ta=e(hs,"LI",{});var Im=p(Ta);Ws=e(Im,"A",{href:!0,rel:!0});var j0=p(Ws);Vm=l(j0,"\u201CA Recipe for Training Neural Networks\u201D"),j0.forEach(a),Fm=l(Im," b\u1EDFi Andrej Karpathy"),Im.forEach(a),hs.forEach(a),mc=u(n),xa=e(n,"P",{});var f0=p(xa);Hm=l(f0,"T\u1EA5t nhi\xEAn, kh\xF4ng ph\u1EA3i m\u1ECDi v\u1EA5n \u0111\u1EC1 b\u1EA1n g\u1EB7p ph\u1EA3i khi hu\u1EA5n luy\u1EC7n m\u1EA1ng th\u1EA7n kinh \u0111\u1EC1u l\xE0 l\u1ED7i c\u1EE7a ch\xEDnh b\u1EA1n! N\u1EBFu b\u1EA1n g\u1EB7p \u0111i\u1EC1u g\xEC \u0111\xF3 trong th\u01B0 vi\u1EC7n \u{1F917} Transformers ho\u1EB7c \u{1F917} Datasets c\xF3 v\u1EBB kh\xF4ng \u1ED5n, c\xF3 th\u1EC3 b\u1EA1n \u0111\xE3 g\u1EB7p l\u1ED7i. B\u1EA1n ch\u1EAFc ch\u1EAFn n\xEAn cho ch\xFAng t\xF4i bi\u1EBFt t\u1EA5t c\u1EA3 v\u1EC1 \u0111i\u1EC1u \u0111\xF3 v\xE0 trong ph\u1EA7n ti\u1EBFp theo, ch\xFAng t\xF4i s\u1EBD gi\u1EA3i th\xEDch ch\xEDnh x\xE1c c\xE1ch th\u1EF1c hi\u1EC7n \u0111i\u1EC1u \u0111\xF3."),f0.forEach(a),this.h()},h(){i(b,"name","hf:doc:metadata"),i(b,"content",JSON.stringify(A0)),i(T,"id","g-li-quy-trnh-hun-luyn"),i(T,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(T,"href","#g-li-quy-trnh-hun-luyn"),i(P,"class","relative group"),i(W,"href","/course/chapter7"),i(es,"href","https://huggingface.co/datasets/glue"),i(es,"rel","nofollow"),i(Pn,"id","kim-tra-d-liu-ca-bn"),i(Pn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(Pn,"href","#kim-tra-d-liu-ca-bn"),i(un,"class","relative group"),i(On,"id","kim-tra-m-hnh-ca-bn"),i(On,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(On,"href","#kim-tra-m-hnh-ca-bn"),i(bn,"class","relative group"),i(Kn,"id","kim-tra-siu-tham-s-ca-bn"),i(Kn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(Kn,"href","#kim-tra-siu-tham-s-ca-bn"),i(on,"class","relative group"),i(As,"href","https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/Adam"),i(As,"rel","nofollow"),i(Vn,"id","cc-vn-tim-n-khc"),i(Vn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(Vn,"href","#cc-vn-tim-n-khc"),i(gn,"class","relative group"),i(Fn,"id","x-l-li-ht-b-nh"),i(Fn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(Fn,"href","#x-l-li-ht-b-nh"),i(jn,"class","relative group"),i(Gn,"id","tensorflow-i-ri-i-ri"),i(Gn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(Gn,"href","#tensorflow-i-ri-i-ri"),i(fn,"class","relative group"),i(Un,"id","kim-tra-li-d-liu-ca-bn-mt-ln-na"),i(Un,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(Un,"href","#kim-tra-li-d-liu-ca-bn-mt-ln-na"),i(vn,"class","relative group"),i(Rn,"id","hc-k-m-hnh-ca-bn-trong-mt-l"),i(Rn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(Rn,"href","#hc-k-m-hnh-ca-bn-trong-mt-l"),i(yn,"class","relative group"),i(Wn,"id","khng-iu-chnh-bt-c-th-g-cho-n-khi-bn-c-m-hnh-c-s-u-tin"),i(Wn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(Wn,"href","#khng-iu-chnh-bt-c-th-g-cho-n-khi-bn-c-m-hnh-c-s-u-tin"),i(dn,"class","relative group"),i(Zn,"id","yu-cu-gip"),i(Zn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(Zn,"href","#yu-cu-gip"),i(kn,"class","relative group"),i(Rs,"href","https://discuss.huggingface.co/"),i(Rs,"rel","nofollow"),i(Is,"href","https://docs.google.com/presentation/d/1yHLPvPhUs2KGI5ZWo0sU-PKU3GimAk3iTsI38Z-B5Gw/edit#slide=id.p"),i(Is,"rel","nofollow"),i(Xs,"href","https://towardsdatascience.com/checklist-for-debugging-neural-networks-d8b2a9434f21"),i(Xs,"rel","nofollow"),i(Js,"href","https://medium.com/@keeper6928/how-to-unit-test-machine-learning-code-57cf6fd81765"),i(Js,"rel","nofollow"),i(Ws,"href","http://karpathy.github.io/2019/04/25/recipe/"),i(Ws,"rel","nofollow")},m(n,t){s(document.head,b),r(n,E,t),j(d,n,t),r(n,_,t),r(n,P,t),s(P,T),s(T,N),j(D,N,null),s(P,en),s(P,pn),s(pn,ls),r(n,J,t),j(H,n,t),r(n,_n,t),r(n,A,t),s(A,K),s(A,W),s(W,rn),s(A,ts),s(A,mn),s(mn,En),s(A,Y),r(n,wn,t),j(q,n,t),r(n,C,t),r(n,G,t),s(G,sa),s(G,qn),s(qn,aa),s(G,Cn),r(n,cs,t),r(n,L,t),s(L,Bc),s(L,za),s(za,Sc),s(L,Kc),r(n,wl,t),r(n,Tn,t),s(Tn,zc),s(Tn,es),s(es,Mc),s(Tn,Vc),r(n,ql,t),j(ps,n,t),r(n,Cl,t),r(n,xn,t),s(xn,Fc),s(xn,Ma),s(Ma,Hc),s(xn,Gc),r(n,Tl,t),r(n,ha,t),s(ha,Lc),r(n,xl,t),j(rs,n,t),r(n,Pl,t),r(n,la,t),s(la,Uc),r(n,Nl,t),r(n,un,t),s(un,Pn),s(Pn,Va),j(ms,Va,null),s(un,Rc),s(un,Fa),s(Fa,Ic),r(n,Al,t),r(n,ta,t),s(ta,Xc),r(n,Dl,t),r(n,x,t),s(x,Jc),s(x,Ha),s(Ha,Wc),s(x,Yc),s(x,Ga),s(Ga,Zc),s(x,Qc),s(x,La),s(La,ne),s(x,se),s(x,Ua),s(Ua,ae),s(x,he),s(x,Ra),s(Ra,le),s(x,te),s(x,Ia),s(Ia,ce),s(x,ee),r(n,Ol,t),j(us,n,t),r(n,Bl,t),r(n,U,t),s(U,Xa),s(Xa,pe),s(U,re),s(U,Ja),s(Ja,me),s(U,ue),s(U,Wa),s(Wa,ie),s(U,be),r(n,Sl,t),j(is,n,t),r(n,Kl,t),r(n,z,t),s(z,oe),s(z,Ya),s(Ya,ge),s(z,je),s(z,Za),s(Za,fe),s(z,ve),s(z,Qa),s(Qa,ye),s(z,de),r(n,zl,t),r(n,Nn,t),s(Nn,ke),s(Nn,nh),s(nh,$e),s(Nn,_e),r(n,Ml,t),r(n,Z,t),s(Z,Ee),s(Z,sh),s(sh,we),s(Z,qe),s(Z,ah),s(ah,Ce),s(Z,Te),r(n,Vl,t),j(bs,n,t),r(n,Fl,t),r(n,ca,t),s(ca,xe),r(n,Hl,t),j(An,n,t),r(n,Gl,t),r(n,Dn,t),s(Dn,Pe),s(Dn,hh),s(hh,Ne),s(Dn,Ae),r(n,Ll,t),j(os,n,t),r(n,Ul,t),r(n,ea,t),s(ea,De),r(n,Rl,t),r(n,gs,t),s(gs,lh),s(lh,Oe),s(gs,Be),r(n,Il,t),r(n,bn,t),s(bn,On),s(On,th),j(js,th,null),s(bn,Se),s(bn,ch),s(ch,Ke),r(n,Xl,t),r(n,R,t),s(R,eh),s(eh,ze),s(R,Me),s(R,ph),s(ph,Ve),s(R,Fe),s(R,rh),s(rh,He),s(R,Ge),r(n,Jl,t),r(n,Q,t),s(Q,Le),s(Q,mh),s(mh,Ue),s(Q,Re),s(Q,uh),s(uh,Ie),s(Q,Xe),r(n,Wl,t),j(fs,n,t),r(n,Yl,t),j(vs,n,t),r(n,Zl,t),r(n,k,t),s(k,Je),s(k,ih),s(ih,We),s(k,Ye),s(k,bh),s(bh,Ze),s(k,Qe),s(k,oh),s(oh,np),s(k,sp),s(k,gh),s(gh,ap),s(k,hp),s(k,jh),s(jh,lp),s(k,tp),s(k,fh),s(fh,cp),s(k,ep),s(k,vh),s(vh,pp),s(k,rp),s(k,yh),s(yh,mp),s(k,up),s(k,dh),s(dh,ip),s(k,bp),s(k,kh),s(kh,op),s(k,gp),s(k,$h),s($h,jp),s(k,fp),s(k,_h),s(_h,vp),s(k,yp),s(k,Eh),s(Eh,dp),s(k,kp),s(k,wh),s(wh,$p),s(k,_p),s(k,qh),s(qh,Ep),s(k,wp),r(n,Ql,t),r(n,M,t),s(M,qp),s(M,Ch),s(Ch,Cp),s(M,Tp),s(M,Th),s(Th,xp),s(M,Pp),s(M,xh),s(xh,Np),s(M,Ap),r(n,nt,t),j(ys,n,t),r(n,st,t),r(n,pa,t),s(pa,Dp),r(n,at,t),j(ds,n,t),r(n,ht,t),r(n,I,t),s(I,Ph),s(Ph,Op),s(I,Bp),s(I,Nh),s(Nh,Sp),s(I,Kp),s(I,Ah),s(Ah,zp),s(I,Mp),r(n,lt,t),j(ks,n,t),r(n,tt,t),j($s,n,t),r(n,ct,t),r(n,ra,t),s(ra,Vp),r(n,et,t),j(_s,n,t),r(n,pt,t),j(Es,n,t),r(n,rt,t),r(n,ma,t),s(ma,Fp),r(n,mt,t),j(ws,n,t),r(n,ut,t),j(qs,n,t),r(n,it,t),r(n,nn,t),s(nn,Hp),s(nn,Dh),s(Dh,Gp),s(nn,Lp),s(nn,Oh),s(Oh,Up),s(nn,Rp),r(n,bt,t),j(Cs,n,t),r(n,ot,t),j(Ts,n,t),r(n,gt,t),r(n,Bn,t),s(Bn,Ip),s(Bn,Bh),s(Bh,Xp),s(Bn,Jp),r(n,jt,t),j(xs,n,t),r(n,ft,t),j(Ps,n,t),r(n,vt,t),r(n,Sn,t),s(Sn,Wp),s(Sn,Sh),s(Sh,Yp),s(Sn,Zp),r(n,yt,t),r(n,on,t),s(on,Kn),s(Kn,Kh),j(Ns,Kh,null),s(on,Qp),s(on,zh),s(zh,nr),r(n,dt,t),r(n,sn,t),s(sn,sr),s(sn,Mh),s(Mh,ar),s(sn,hr),s(sn,Vh),s(Vh,lr),s(sn,tr),r(n,kt,t),r(n,zn,t),s(zn,cr),s(zn,As),s(As,er),s(zn,pr),r(n,$t,t),r(n,an,t),s(an,rr),s(an,Fh),s(Fh,mr),s(an,ur),s(an,Hh),s(Hh,ir),s(an,br),r(n,_t,t),j(Ds,n,t),r(n,Et,t),j(Mn,n,t),r(n,wt,t),r(n,ua,t),s(ua,or),r(n,qt,t),j(Os,n,t),r(n,Ct,t),j(Bs,n,t),r(n,Tt,t),r(n,ia,t),s(ia,gr),r(n,xt,t),r(n,gn,t),s(gn,Vn),s(Vn,Gh),j(Ss,Gh,null),s(gn,jr),s(gn,Lh),s(Lh,fr),r(n,Pt,t),r(n,ba,t),s(ba,vr),r(n,Nt,t),r(n,jn,t),s(jn,Fn),s(Fn,Uh),j(Ks,Uh,null),s(jn,yr),s(jn,Rh),s(Rh,dr),r(n,At,t),r(n,hn,t),s(hn,kr),s(hn,Ih),s(Ih,$r),s(hn,_r),s(hn,Xh),s(Xh,Er),s(hn,wr),r(n,Dt,t),j(Hn,n,t),r(n,Ot,t),r(n,fn,t),s(fn,Gn),s(Gn,Jh),j(zs,Jh,null),s(fn,qr),s(fn,Wh),s(Wh,Cr),r(n,Bt,t),r(n,ln,t),s(ln,Tr),s(ln,Yh),s(Yh,xr),s(ln,Pr),s(ln,Zh),s(Zh,Nr),s(ln,Ar),r(n,St,t),r(n,oa,t),s(oa,Dr),r(n,Kt,t),r(n,Ln,t),s(Ln,Or),s(Ln,Qh),s(Qh,Br),s(Ln,Sr),r(n,zt,t),r(n,vn,t),s(vn,Un),s(Un,nl),j(Ms,nl,null),s(vn,Kr),s(vn,sl),s(sl,zr),r(n,Mt,t),r(n,O,t),s(O,Mr),s(O,al),s(al,Vr),s(O,Fr),s(O,hl),s(hl,Hr),s(O,Gr),s(O,ll),s(ll,Lr),s(O,Ur),s(O,tl),s(tl,Rr),s(O,Ir),r(n,Vt,t),j(Vs,n,t),r(n,Ft,t),r(n,ga,t),s(ga,Xr),r(n,Ht,t),j(Fs,n,t),r(n,Gt,t),r(n,ja,t),s(ja,Jr),r(n,Lt,t),r(n,V,t),s(V,cl),s(cl,Wr),s(V,Yr),s(V,el),s(el,Zr),s(V,Qr),s(V,pl),s(pl,nm),s(V,sm),s(V,rl),s(rl,am),r(n,Ut,t),r(n,fa,t),s(fa,hm),r(n,Rt,t),r(n,va,t),s(va,lm),r(n,It,t),r(n,ya,t),s(ya,tm),r(n,Xt,t),r(n,yn,t),s(yn,Rn),s(Rn,ml),j(Hs,ml,null),s(yn,cm),s(yn,ul),s(ul,em),r(n,Jt,t),r(n,da,t),s(da,pm),r(n,Wt,t),r(n,tn,t),s(tn,rm),s(tn,il),s(il,mm),s(tn,um),s(tn,bl),s(bl,im),s(tn,bm),r(n,Yt,t),j(Gs,n,t),r(n,Zt,t),j(In,n,t),r(n,Qt,t),r(n,Xn,t),s(Xn,om),s(Xn,ol),s(ol,gm),s(Xn,jm),r(n,nc,t),r(n,ka,t),s(ka,fm),r(n,sc,t),j(Jn,n,t),r(n,ac,t),r(n,dn,t),s(dn,Wn),s(Wn,gl),j(Ls,gl,null),s(dn,vm),s(dn,jl),s(jl,ym),r(n,hc,t),r(n,Yn,t),s(Yn,dm),s(Yn,fl),s(fl,km),s(Yn,$m),r(n,lc,t),r(n,$a,t),s($a,_m),r(n,tc,t),r(n,_a,t),s(_a,Em),r(n,cc,t),r(n,kn,t),s(kn,Zn),s(Zn,vl),j(Us,vl,null),s(kn,wm),s(kn,yl),s(yl,qm),r(n,ec,t),r(n,Qn,t),s(Qn,Cm),s(Qn,Rs),s(Rs,Tm),s(Qn,xm),r(n,pc,t),r(n,Ea,t),s(Ea,Pm),r(n,rc,t),r(n,F,t),s(F,wa),s(wa,Is),s(Is,Nm),s(wa,Am),s(F,Dm),s(F,qa),s(qa,Xs),s(Xs,Om),s(qa,Bm),s(F,Sm),s(F,Ca),s(Ca,Js),s(Js,Km),s(Ca,zm),s(F,Mm),s(F,Ta),s(Ta,Ws),s(Ws,Vm),s(Ta,Fm),r(n,mc,t),r(n,xa,t),s(xa,Hm),uc=!0},p(n,[t]){const Ys={};t&1&&(Ys.fw=n[0]),d.$set(Ys);const dl={};t&2&&(dl.$$scope={dirty:t,ctx:n}),An.$set(dl);const kl={};t&2&&(kl.$$scope={dirty:t,ctx:n}),Mn.$set(kl);const $l={};t&2&&($l.$$scope={dirty:t,ctx:n}),Hn.$set($l);const $n={};t&2&&($n.$$scope={dirty:t,ctx:n}),In.$set($n);const _l={};t&2&&(_l.$$scope={dirty:t,ctx:n}),Jn.$set(_l)},i(n){uc||(f(d.$$.fragment,n),f(D.$$.fragment,n),f(H.$$.fragment,n),f(q.$$.fragment,n),f(ps.$$.fragment,n),f(rs.$$.fragment,n),f(ms.$$.fragment,n),f(us.$$.fragment,n),f(is.$$.fragment,n),f(bs.$$.fragment,n),f(An.$$.fragment,n),f(os.$$.fragment,n),f(js.$$.fragment,n),f(fs.$$.fragment,n),f(vs.$$.fragment,n),f(ys.$$.fragment,n),f(ds.$$.fragment,n),f(ks.$$.fragment,n),f($s.$$.fragment,n),f(_s.$$.fragment,n),f(Es.$$.fragment,n),f(ws.$$.fragment,n),f(qs.$$.fragment,n),f(Cs.$$.fragment,n),f(Ts.$$.fragment,n),f(xs.$$.fragment,n),f(Ps.$$.fragment,n),f(Ns.$$.fragment,n),f(Ds.$$.fragment,n),f(Mn.$$.fragment,n),f(Os.$$.fragment,n),f(Bs.$$.fragment,n),f(Ss.$$.fragment,n),f(Ks.$$.fragment,n),f(Hn.$$.fragment,n),f(zs.$$.fragment,n),f(Ms.$$.fragment,n),f(Vs.$$.fragment,n),f(Fs.$$.fragment,n),f(Hs.$$.fragment,n),f(Gs.$$.fragment,n),f(In.$$.fragment,n),f(Jn.$$.fragment,n),f(Ls.$$.fragment,n),f(Us.$$.fragment,n),uc=!0)},o(n){v(d.$$.fragment,n),v(D.$$.fragment,n),v(H.$$.fragment,n),v(q.$$.fragment,n),v(ps.$$.fragment,n),v(rs.$$.fragment,n),v(ms.$$.fragment,n),v(us.$$.fragment,n),v(is.$$.fragment,n),v(bs.$$.fragment,n),v(An.$$.fragment,n),v(os.$$.fragment,n),v(js.$$.fragment,n),v(fs.$$.fragment,n),v(vs.$$.fragment,n),v(ys.$$.fragment,n),v(ds.$$.fragment,n),v(ks.$$.fragment,n),v($s.$$.fragment,n),v(_s.$$.fragment,n),v(Es.$$.fragment,n),v(ws.$$.fragment,n),v(qs.$$.fragment,n),v(Cs.$$.fragment,n),v(Ts.$$.fragment,n),v(xs.$$.fragment,n),v(Ps.$$.fragment,n),v(Ns.$$.fragment,n),v(Ds.$$.fragment,n),v(Mn.$$.fragment,n),v(Os.$$.fragment,n),v(Bs.$$.fragment,n),v(Ss.$$.fragment,n),v(Ks.$$.fragment,n),v(Hn.$$.fragment,n),v(zs.$$.fragment,n),v(Ms.$$.fragment,n),v(Vs.$$.fragment,n),v(Fs.$$.fragment,n),v(Hs.$$.fragment,n),v(Gs.$$.fragment,n),v(In.$$.fragment,n),v(Jn.$$.fragment,n),v(Ls.$$.fragment,n),v(Us.$$.fragment,n),uc=!1},d(n){a(b),n&&a(E),y(d,n),n&&a(_),n&&a(P),y(D),n&&a(J),y(H,n),n&&a(_n),n&&a(A),n&&a(wn),y(q,n),n&&a(C),n&&a(G),n&&a(cs),n&&a(L),n&&a(wl),n&&a(Tn),n&&a(ql),y(ps,n),n&&a(Cl),n&&a(xn),n&&a(Tl),n&&a(ha),n&&a(xl),y(rs,n),n&&a(Pl),n&&a(la),n&&a(Nl),n&&a(un),y(ms),n&&a(Al),n&&a(ta),n&&a(Dl),n&&a(x),n&&a(Ol),y(us,n),n&&a(Bl),n&&a(U),n&&a(Sl),y(is,n),n&&a(Kl),n&&a(z),n&&a(zl),n&&a(Nn),n&&a(Ml),n&&a(Z),n&&a(Vl),y(bs,n),n&&a(Fl),n&&a(ca),n&&a(Hl),y(An,n),n&&a(Gl),n&&a(Dn),n&&a(Ll),y(os,n),n&&a(Ul),n&&a(ea),n&&a(Rl),n&&a(gs),n&&a(Il),n&&a(bn),y(js),n&&a(Xl),n&&a(R),n&&a(Jl),n&&a(Q),n&&a(Wl),y(fs,n),n&&a(Yl),y(vs,n),n&&a(Zl),n&&a(k),n&&a(Ql),n&&a(M),n&&a(nt),y(ys,n),n&&a(st),n&&a(pa),n&&a(at),y(ds,n),n&&a(ht),n&&a(I),n&&a(lt),y(ks,n),n&&a(tt),y($s,n),n&&a(ct),n&&a(ra),n&&a(et),y(_s,n),n&&a(pt),y(Es,n),n&&a(rt),n&&a(ma),n&&a(mt),y(ws,n),n&&a(ut),y(qs,n),n&&a(it),n&&a(nn),n&&a(bt),y(Cs,n),n&&a(ot),y(Ts,n),n&&a(gt),n&&a(Bn),n&&a(jt),y(xs,n),n&&a(ft),y(Ps,n),n&&a(vt),n&&a(Sn),n&&a(yt),n&&a(on),y(Ns),n&&a(dt),n&&a(sn),n&&a(kt),n&&a(zn),n&&a($t),n&&a(an),n&&a(_t),y(Ds,n),n&&a(Et),y(Mn,n),n&&a(wt),n&&a(ua),n&&a(qt),y(Os,n),n&&a(Ct),y(Bs,n),n&&a(Tt),n&&a(ia),n&&a(xt),n&&a(gn),y(Ss),n&&a(Pt),n&&a(ba),n&&a(Nt),n&&a(jn),y(Ks),n&&a(At),n&&a(hn),n&&a(Dt),y(Hn,n),n&&a(Ot),n&&a(fn),y(zs),n&&a(Bt),n&&a(ln),n&&a(St),n&&a(oa),n&&a(Kt),n&&a(Ln),n&&a(zt),n&&a(vn),y(Ms),n&&a(Mt),n&&a(O),n&&a(Vt),y(Vs,n),n&&a(Ft),n&&a(ga),n&&a(Ht),y(Fs,n),n&&a(Gt),n&&a(ja),n&&a(Lt),n&&a(V),n&&a(Ut),n&&a(fa),n&&a(Rt),n&&a(va),n&&a(It),n&&a(ya),n&&a(Xt),n&&a(yn),y(Hs),n&&a(Jt),n&&a(da),n&&a(Wt),n&&a(tn),n&&a(Yt),y(Gs,n),n&&a(Zt),y(In,n),n&&a(Qt),n&&a(Xn),n&&a(nc),n&&a(ka),n&&a(sc),y(Jn,n),n&&a(ac),n&&a(dn),y(Ls),n&&a(hc),n&&a(Yn),n&&a(lc),n&&a($a),n&&a(tc),n&&a(_a),n&&a(cc),n&&a(kn),y(Us),n&&a(ec),n&&a(Qn),n&&a(pc),n&&a(Ea),n&&a(rc),n&&a(F),n&&a(mc),n&&a(xa)}}}const A0={local:"g-li-quy-trnh-hun-luyn",sections:[{local:null,sections:[{local:"kim-tra-d-liu-ca-bn",title:"Ki\u1EC3m tra d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n"},{local:"kim-tra-m-hnh-ca-bn",title:"Ki\u1EC3m tra m\xF4 h\xECnh c\u1EE7a b\u1EA1n"},{local:"kim-tra-siu-tham-s-ca-bn",title:"Ki\u1EC3m tra si\xEAu tham s\u1ED1 c\u1EE7a b\u1EA1n"}],title:null},{local:"cc-vn-tim-n-khc",sections:[{local:"x-l-li-ht-b-nh",title:"X\u1EED l\xFD l\u1ED7i h\u1EBFt b\u1ED9 nh\u1EDB"},{local:"tensorflow-i-ri-i-ri",title:"TensorFlow \u0111\xF3i r\u1ED3i \u0111\xF3i r\u1ED3i\u{1F99B}"},{local:"kim-tra-li-d-liu-ca-bn-mt-ln-na",title:"Ki\u1EC3m tra l\u1EA1i d\u1EEF li\u1EC7u c\u1EE7a b\u1EA1n (m\u1ED9t l\u1EA7n n\u1EEFa!)"},{local:"hc-k-m-hnh-ca-bn-trong-mt-l",title:"H\u1ECDc k\u0129 m\xF4 h\xECnh c\u1EE7a b\u1EA1n trong m\u1ED9t l\xF4"},{local:"khng-iu-chnh-bt-c-th-g-cho-n-khi-bn-c-m-hnh-c-s-u-tin",title:"Kh\xF4ng \u0111i\u1EC1u ch\u1EC9nh b\u1EA5t c\u1EE9 th\u1EE9 g\xEC cho \u0111\u1EBFn khi b\u1EA1n c\xF3 m\xF4 h\xECnh c\u01A1 s\u1EDF \u0111\u1EA7u ti\xEAn"},{local:"yu-cu-gip",title:"Y\xEAu c\u1EA7u gi\xFAp \u0111\u1EE1"}],title:"C\xE1c v\u1EA5n \u0111\u1EC1 ti\u1EC1m \u1EA9n kh\xE1c"}],title:"G\u1EE1 l\u1ED7i quy tr\xECnh hu\u1EA5n luy\u1EC7n"};function D0(S,b,E){let d="pt";return $0(()=>{const _=new URLSearchParams(window.location.search);E(0,d=_.get("fw")||"pt")}),[d]}class F0 extends v0{constructor(b){super();y0(this,b,D0,N0,d0,{})}}export{F0 as default,A0 as metadata};
