KERAS/TENSORFLOW Franois Fayard November 29, 2017 BAYNCORE PARIS - - PowerPoint PPT Presentation

keras tensorflow
SMART_READER_LITE
LIVE PREVIEW

KERAS/TENSORFLOW Franois Fayard November 29, 2017 BAYNCORE PARIS - - PowerPoint PPT Presentation

KERAS/TENSORFLOW Franois Fayard November 29, 2017 BAYNCORE PARIS Deep Learning The Mark I Perceptron Machine Cornell Aeronautical Laboratory The perceptron (1957) 2 Classifying points in the plane P = (x 1 , x 2 ) 3 The Perceptron The


slide-1
SLIDE 1

KERAS/TENSORFLOW

François Fayard BAYNCORE November 29, 2017 PARIS

slide-2
SLIDE 2

2

Deep Learning

The perceptron

The Mark I Perceptron Machine Cornell Aeronautical Laboratory (1957)

slide-3
SLIDE 3

3

Classifying points in the plane

P = (x1, x2)

slide-4
SLIDE 4

4

The Perceptron

The point P = (x1, x2) will be classified as:

  • blue if u⍺(x1, x2) > 0
  • red if u⍺(x1, x2) < 0
slide-5
SLIDE 5

5

A Perceptron is a linear classifier

P = (x1, x2)

slide-6
SLIDE 6

6

The loss function for a classifier and a given point

For any given point P = (x1, x2), we define the loss L(⍺, P) by:

slide-7
SLIDE 7

7

The loss function for a classifier

  • The loss for a classifier u⍺ is defined as
  • We seek for the classifier with the smallest loss
slide-8
SLIDE 8

8

Stochastic Gradient Descent

  • To minimize L:
  • We start with a random value ⍺
  • We compute the gradient of L analytically (backpropagation) using only

a random subset of the images (mini batch)

  • We update ⍺ by

where η is the learning rate

  • We iterate the process until convergence
slide-9
SLIDE 9

9

Introducing Keras

  • Keras is an API specification for building Deep Learning models across

platforms Keras API specification TensorFlow-Keras … Theano-Keras

slide-10
SLIDE 10

10

Installing Keras& TensorFlow

slide-11
SLIDE 11

11

Installing Kerasis easy with Intel

Intel Confidential

slide-12
SLIDE 12

12

Training a neural network is easy with Keras

Intel Confidential

slide-13
SLIDE 13

13

Linear classifiers don’t always do the job

P = (x1, x2)

slide-14
SLIDE 14

14

Hidden LAYERS

Our first hidden layer

slide-15
SLIDE 15

15

Our first hidden layer

slide-16
SLIDE 16

16

The activation function

slide-17
SLIDE 17

17

Training a neural network is easy with Keras

slide-18
SLIDE 18

18

Deep learning does the job

P = (x1, x2)

slide-19
SLIDE 19

19

MNIST

slide-20
SLIDE 20

20

Reading digits from MNIST

slide-21
SLIDE 21

21

Deep Learning at Bell Labs: Late 80s

Yann Le Cun Director of AI Research Facebook

slide-22
SLIDE 22

22

Defining the neural network

slide-23
SLIDE 23

23

Defining the neural network

slide-24
SLIDE 24

24

The learning phase

slide-25
SLIDE 25

25

Benchmarks: Intel TensorFlow

slide-26
SLIDE 26

26

The benchmark: AlexNet

Won the ImageNet Challenge in 2012. Topology:

  • 5 convolutional layers
  • 3 fully connected layers
  • 60 million parameters, 650 000 neurons
slide-27
SLIDE 27

27

Google TensorFlowperformance on AlexNet

50 100 150 200 250 300 350 400 Original

Images per second

Training - Google Inference - Google

slide-28
SLIDE 28

28

Running vTuneon Google TensorFlow

slide-29
SLIDE 29

29

Google/Intel TensorFlowperformance on AlexNet

200 400 600 800 1000 1200 1400 1600 1800 2000 Original

Number of images per second

Inference - Google Inference - Intel 200 400 600 800 1000 1200 1400 1600 1800 2000 Original

Number of images per second

Training - Google Training - Intel

slide-30
SLIDE 30

30

Running vTuneon Intel TensorFlow

slide-31
SLIDE 31

31

Take Home Messages

  • Starting Deep Learning is easy with Keras
  • Keras is better seen as an API. It can be used with different frameworks.
  • Use Intel Optimized Python Distribution for better performance
slide-32
SLIDE 32

Questions

32

slide-33
SLIDE 33