Neural Networks: Prediction (i.e. the forward pass) Machine - - PowerPoint PPT Presentation

neural networks prediction i e the forward pass
SMART_READER_LITE
LIVE PREVIEW

Neural Networks: Prediction (i.e. the forward pass) Machine - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

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

slide-2
SLIDE 2

Neural Networks

  • What is a neural network?
  • Predicting with a neural network
  • Training neural networks
  • Practical concerns

2

slide-3
SLIDE 3

This lecture

  • What is a neural network?
  • Predicting with a neural network
  • Training neural networks
  • Practical concerns

3

slide-4
SLIDE 4

Let us consider an example network

4

We will use this example network as to introduce the general principle of how to make predictions with a neural network.

  • utput
slide-5
SLIDE 5

Let us consider an example network

5

Naming conventions for this example

  • Inputs: x
  • Hidden: z
  • Output: y

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1

  • utput
slide-6
SLIDE 6

Let us consider an example network

6

Bias feature, always 1

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1

  • utput

Naming conventions for this example

  • Inputs: x
  • Hidden: z
  • Output: y
slide-7
SLIDE 7

Let us consider an example network

7

Sigmoid activations

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1

  • utput

Bias feature, always 1 Naming conventions for this example

  • Inputs: x
  • Hidden: z
  • Output: y
slide-8
SLIDE 8

Let us consider an example network

8

Sigmoid activations

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1

  • utput

Bias feature, always 1 Naming conventions for this example

  • Inputs: x
  • Hidden: z
  • Output: y

Linear activation

slide-9
SLIDE 9

Let us consider an example network

9

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1 𝑥"!

#$%

𝑥!!

#$%

𝑥&!

#$%

𝑥""

'

𝑥&!

'

  • utput

Naming Convention for Weights

𝑥()*+,-*

  • .)/0--1.20)
slide-10
SLIDE 10

Let us consider an example network

10

Naming Convention for Weights

𝑥&!

#$%

From neuron #0 to neuron #1 in

  • utput layer

𝑥()*+,-*

  • .)/0--1.20)

𝑥""

'

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1

  • utput

𝑥"!

#$%

𝑥!!

#$%

𝑥&!

#$%

𝑥&!

'

slide-11
SLIDE 11

How to predict: The forward pass

11

Given an input x, how is the output predicted

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1

  • utput

𝑥"!

#$%

𝑥!!

#$%

𝑥&!

#$%

𝑥&!

'

𝑥""

'

slide-12
SLIDE 12

The forward pass

12

Given an input x, how is the output predicted

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1 𝑥"!

#$%

𝑥!!

#$%

𝑥&!

#$%

𝑥&!

'

z! = 𝜏(𝑥"!

# + 𝑥!! # 𝑦! + 𝑥$! # 𝑦$)

  • utput

𝑥""

'

slide-13
SLIDE 13

The forward pass

13

Given an input x, how is the output predicted

  • utput

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1 𝑥"!

#$%

𝑥!!

#$%

𝑥&!

#$%

𝑥&!

'

𝑥""

'

z! = 𝜏(𝑥"!

# + 𝑥!! # 𝑦! + 𝑥$! # 𝑦$)

𝑨$ = 𝜏(𝑥"$

# + 𝑥!$ # 𝑦! + 𝑥$$ # 𝑦$)

slide-14
SLIDE 14

The forward pass

14

Given an input x, how is the output predicted

  • utput

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1 𝑥"!

#$%

𝑥!!

#$%

𝑥&!

#$%

𝑥&!

'

𝑥""

'

z! = 𝜏(𝑥"!

# + 𝑥!! # 𝑦! + 𝑥$! # 𝑦$)

𝑨$ = 𝜏(𝑥"$

# + 𝑥!$ # 𝑦! + 𝑥$$ # 𝑦$)

y = 𝑥"!

% + 𝑥!! % 𝑨! + 𝑥$! % 𝑨$

  • utput
slide-15
SLIDE 15

The forward pass

15

Given an input x, how is the output predicted

  • utput

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1 𝑥!!

#$%

𝑥&!

#$%

𝑥&!

'

𝑥""

'

z! = 𝜏(𝑥"!

# + 𝑥!! # 𝑦! + 𝑥$! # 𝑦$)

𝑨$ = 𝜏(𝑥"$

# + 𝑥!$ # 𝑦! + 𝑥$$ # 𝑦$)

y = 𝑥"!

% + 𝑥!! % 𝑨! + 𝑥$! % 𝑨$

  • utput
slide-16
SLIDE 16

The forward pass

16

Given an input x, how is the output predicted

z! = 𝜏(𝑥"!

# + 𝑥!! # 𝑦! + 𝑥$! # 𝑦$)

𝑨$ = 𝜏(𝑥"$

# + 𝑥!$ # 𝑦! + 𝑥$$ # 𝑦$)

y = 𝑥"!

% + 𝑥!! % 𝑨! + 𝑥$! % 𝑨$

  • utput

In general, before visiting (i.e. computing) the value of a node, visit all nodes that serve as inputs to it.

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1 𝑥"!

#$%

𝑥!!

#$%

𝑥&!

#$%

𝑥""

'

𝑥&!

'

  • utput
slide-17
SLIDE 17

The forward pass

17

Given an input x, how is the output predicted

z! = 𝜏(𝑥"!

# + 𝑥!! # 𝑦! + 𝑥$! # 𝑦$)

𝑨$ = 𝜏(𝑥"$

# + 𝑥!$ # 𝑦! + 𝑥$$ # 𝑦$)

y = 𝑥"!

% + 𝑥!! % 𝑨! + 𝑥$! % 𝑨$

  • utput

In general, before visiting (i.e. computing) the value

  • f a node, visit all nodes that serve as inputs to it.

𝑧 𝑨! 𝑨" 1 𝑦! 𝑦" 1 𝑥"!

#$%

𝑥!!

#$%

𝑥&!

#$%

𝑥""

'

𝑥&!

'

  • utput

Questions?