AndwelcometopartsevenofourchapelwithpythontensorflowandDeepLearningtutorialSirisinthisvideoovermedoingisactuallyonedeploying a modelbuttotalkingabout a realhighlevelsense, atleasttwomajorkindofmodelframeworksthat I'vepersonallyusedforchatbots.
Sofirstofall, when I have, like, firststartedlookingintodoingchatbots, itwasactuallykindofchallengingtofigureoutlikeOkay, well, okay, let's sayyouwantedtodeeplearningandyoudon't wanttodo a ruleBateschatbylike, whatdoyouevenusedtodothatright?
Uh, andtherewas a lot.
Therewassomuchinformationouttherefordoinglike a rulebasedchap, mostlikelybecausethemostpopularandthemostsuccessfulchatbots, reallytodatehavebeenrulebased, atleasttosomedegree, arguablythemostsuccessfulones.
Rightnow, we'rekindoflikemixturesofthetolikehaverulesandhave a I.
Andaswe'llseehere, andatleastallthemodels I'vehadalmostalwaysneededtoupendsomerulestotheoutputifnottostopthe A I justrepeatingitself, butalsojusttostopresponsesthatjustnevermakesenseorwhatever.
Sochancesareyou'realmostalwaysgonnaneed a comboofthetwo.
Butmaybein a fewyearswe'llbeabletomakeitadvancedenoughchatbotsthatdon't.
Anyway, as I waslooking, I stumbledintosequences, sequencestuffwithtensorflow.
And, um, I gotkindahookedintotheirtranslationtutorialsatthetime.
ItwasanEnglishtoFrenchnational.
See, thisisforspecificallyversion 1.1.
Um, actually, I don't eventhinkthisworksin 1.1 becausethey'reusing a differentversionofsequencetosequencelike, I don't thinkthisactuallymatchesthecodethat's undergethub.
Sogetclonerecursiveandthenwe'llsettlethisup, so I'm actuallygonnagoaheadandrunthroughthatmyself.
So I'm justgonnapullthisoverhere.
I'm gonnausepaperspace.
Youdon't havetousefavorspace.
Youcanuseyourown.
Youcandothislocally.
YoucanactuallydothislocallyonyourCPU.
Youcould, intheory, traineditonyourCPU.
Itwillbeveryslow.
Um, butyoucan't.
Sothereyougo.
So I'm gonnagoaheadand I'llput a linkinthedescriptionforreferralcode.
Ifanybodywantsit, it's $10 whichwillbemorethanenoughtogetyouthroughtraining a decentchapout, whichagaininproduction, LikethechapononTwitterThatrespondstoyouwithinseconds.
Inresponsetomultiplepeopleinseconds, I madehimwith, um, orheisinproductionon a CPUVPsondigitalocean.
So, uh, soyoucandefinitelyruninproductionon a CPU.
Itjusttakesforevertotrainit.
Soanyways, uh, on a box, But I want 16 0 for, uh, ifyouarefallingandyou'regonnagotopaperspace, makesureyouchoose 16 orforceyougotPythonthreetensoflow 1.4.
Allthatgoodstuff, this'llisprobablygonnabefine.
I'm gonnagowiththisone.
Uh, nowwe'lljustcallthisanemptytutorial.
I dowant a public i p if I wanttotransfersomedataandgoodcreatesspace.
Okay, so I'm gonnacreatethat, andthen I'm gonnapositwhile I'm waitingformypasswordandallthat, andforlet's getsplitupandthenour, uh, restartaswe, uhas I canloginandactuallygrabtogethavingallthatallright.
Andwe'rebackthen.
Actuallytookmuchlonger.
Somethingcameup, but I guesstoyou, itdoesn't seemlikeittookanytime.
So I'm justgonnarunthroughtheseandkindofgive a littlebitmoreexplanation, butit's prettymuchjustthis.
So I'm gonnagoaheadandcopythis, andwe'lljustopenupterminalhere, changedirectoryintodesktop, makethis a littlebigger, andthenpaste.
Sowhen a clonethisrecursivelee, becausewedidmake a slightmodificationtoanempty, um, prettysmalloneatthemoment, butitmightgrowintime, soyouprobablywanttocloneitrecursivelee.
Ifyoudidn't haveanyrulesasfaras, like a scoreandallthat, umSonnywasyeah, makesureyougettherequirementsandthenwheneveryou'redone, youchangedirectoryintosetup, and I'm justgonnapullituprealquick.
Um, I'm notactuallygonnamakeanychangestosetup, but I justwantoh, bringyourattentiontoit.
Soinsetup, therearequite a fewthingsthatyoucanmodify.
YoubetterbePython 36 Somyendpythonis 36 Butmakesureyou'regonnaregretitififyoudon't doit, umandthenwe'lljustrunpythonprepareddatadotpipeinthiscasearetrainingfilesareprettysmall, so I guess I shouldhavementioned.