Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey...

14
Machine Learning Neural Networks: Prediction (i.e. the forward pass) 1 Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, Yoav Goldberg, Shai Shalev-Shwartz and Shai Ben-David, and others

Transcript of Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey...

Page 1: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

MachineLearning

NeuralNetworks:Prediction

(i.e.theforwardpass)

1BasedonslidesandmaterialfromGeoffreyHinton,RichardSocher,DanRoth,

Yoav Goldberg,ShaiShalev-Shwartz andShaiBen-David,andothers

Page 2: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

NeuralNetworks

• Whatisaneuralnetwork?

• Predictingwithaneuralnetwork

• Trainingneuralnetworks

• Practicalconcerns

2

Page 3: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

Thislecture

• Whatisaneuralnetwork?

• Predictingwithaneuralnetwork

• Trainingneuralnetworks

• Practicalconcerns

3

Page 4: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

Letusconsideranexamplenetwork

4

Wewillusethisexamplenetwork

astointroducethegeneral

principleofhowtomake

predictionswithaneuralnetwork.

Page 5: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

Letusconsideranexamplenetwork

5

Namingconventionsforthis

example

• Inputs:x

• Hidden:z

• Output:y

Page 6: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

Letusconsideranexamplenetwork

6

Biasfeature,

always1

Namingconventionsforthis

example

• Inputs:x

• Hidden:z

• Output:y

Page 7: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

Letusconsideranexamplenetwork

8

Biasfeature,

always1

Sigmoidactivations

Linearactivation

Namingconventionsforthis

example

• Inputs:x

• Hidden:z

• Output:y

Page 8: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

Letusconsideranexamplenetwork

9

NamingConventionforWeights

!"#$%,'$'(#)*'_,(-*#

Page 9: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

Letusconsideranexamplenetwork

10

NamingConventionforWeights

!"#$%,'$'(#)*'_,(-*#

!./$Fromneuron#0

toneuron#1in

outputlayer

Page 10: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

Howtopredictwithaneuralnetwork:The

forwardpass

11

Givenaninputx,howistheoutputpredicted

Page 11: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

Theforwardpass

12

z/ = 2(!./4 + !//4 6/ + !7/4 67)

Givenaninputx,howistheoutputpredicted

Page 12: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

Theforwardpass

13

97 = 2(!.74 + !/74 6/ + !774 67)

Givenaninputx,howistheoutputpredicted

z/ = 2(!./4 + !//4 6/ + !7/4 67)

Page 13: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

Theforwardpass

14

y = !./$ + !//$ 9/ + !7/$ 97output

Givenaninputx,howistheoutputpredicted

97 = 2(!.74 + !/74 6/ + !774 67)

z/ = 2(!./4 + !//4 6/ + !7/4 67)

Page 14: Neural Networks: Prediction (i.e. the forward pass) · Based on slides and material from Geoffrey Hinton, Richard Socher, Dan Roth, YoavGoldberg, Shai Shalev-Shwartzand Shai Ben-David,

Theforwardpass

15

y = !./$ + !//$ 9/ + !7/$ 97output

Givenaninputx,howistheoutputpredicted

97 = 2(!.74 + !/74 6/ + !774 67)

z/ = 2(!./4 + !//4 6/ + !7/4 67)

Questions?

Ingeneral,beforevisiting(i.e.computing)thevalueofanode,visitallnodesthatserveasinputstoit.