I'm goingtoevaluate a flowerwiththefeatures 5.82 point 75.1 on 1.9.
I knowthatthisisanIrishvirgin, Icka, whichisclass, too.
Butlet's seewhattheneuralnetworkgivesme.
Willfirsttake a lookattheropeprediction, andthenwe'lltake a lookatthepredictionthat's beendeterminedusingourmax.
Let's runthisinthebrowserwhen I refresh, theJavascriptwillstartexecuting, andhereyoucanseemy a poxonmyloss.
Atthatepoch, it's steadilydecreasing, whichisgood, andnow I getmyclassificationandyoucanseethathasverylowprobabilitiesforzeroandoneon a veryhighprobabilityfortwo, whichiswhatwe'd expectif I thenexecute.
Argh!
Max!
Onthis, I willgettoconsidertheamountofcodethatyouwouldhavetowrite.
Inthiscase, it's not a lotwithjusttwoclasses.
Butiftherewere a lotmoreclassesandheneededtofindthebiggest, you'd have a lotofcodingtodo.
ButArgh!
Maxdoesthisforyou.
GiventhatthesevaluesAaron a tensor, I hopethiswas a usefulexplanationofoneheartandcodingandhowitcomplementsINAUGmaxfunction.
Thesearesomeoftheconceptsthatare a bitdifferentwhenyou'recodingformachinelearning, butthey'reincrediblyusefulandpowerful.
Onehotencodingisgreatbecauseit's a wayofmappingyourclassestotheshapethat a neuralnetworkoutputsvalueson.
Argh!
Maxis a functionthatsavesyouwriting a lotofcodetogooverallthosevaluestofindthebiggest.