Slide 1

Slide 1 text

ML: advanced neural networks April 2017

Slide 2

Slide 2 text

Recap

Slide 3

Slide 3 text

Artificial neuron: Perceptron

Slide 4

Slide 4 text

Artifical neuron : activation function

Slide 5

Slide 5 text

Artificial neuron -> Artificial neural network

Slide 6

Slide 6 text

Teaching a neural net

Slide 7

Slide 7 text

Demo: Tensorflow Playground

Slide 8

Slide 8 text

Demo: layered network, still the hard way (97%)

Slide 9

Slide 9 text

Dropout

Slide 10

Slide 10 text

Overfitting

Slide 11

Slide 11 text

Dropout

Slide 12

Slide 12 text

Dropout Result

Slide 13

Slide 13 text

Convolutional Neural Networks

Slide 14

Slide 14 text

Fully connected vs Convolution

Slide 15

Slide 15 text

Convolutional layer: different input sizes

Slide 16

Slide 16 text

Inside a convolution neuron: kernels

Slide 17

Slide 17 text

Stacked computational layers

Slide 18

Slide 18 text

“Deep” layers

Slide 19

Slide 19 text

2D and multiple layers

Slide 20

Slide 20 text

Pooling

Slide 21

Slide 21 text

Max pooling

Slide 22

Slide 22 text

Max pooling in CNN

Slide 23

Slide 23 text

Pooling

Slide 24

Slide 24 text

Multiple layers

Slide 25

Slide 25 text

Convolutional classification (2012)

Slide 26

Slide 26 text

Convolutional architecture

Slide 27

Slide 27 text

Convolutional network -> fully connected

Slide 28

Slide 28 text

Convolutional success (2012)

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Detecting the input

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

Sliding a window

Slide 33

Slide 33 text

Sliding window with different scales

Slide 34

Slide 34 text

Sliding window: result

Slide 35

Slide 35 text

Content to detect in the window for text

Slide 36

Slide 36 text

Sliding window on text

Slide 37

Slide 37 text

Detecting individual characters

Slide 38

Slide 38 text

Cheating

Slide 39

Slide 39 text

Image classification through caffe image = '/tmp/kitten.png' # preprocess the kitten and resize it to 224x224 pixels net.blobs['data'].data[...] = transformer.preprocess('data', caffe.io.load_image(image)) # make a prediction from the kitten pixels out = net.forward() # extract the most likely prediction print("Predicted class is #{}.".format(out['prob'][0].argmax()))

Slide 40

Slide 40 text

Mistakes

Slide 41

Slide 41 text

Finding the gradient def compute_gradient(image, intended_outcome): # Put the image into the network and make the prediction predict(image) # Get an empty set of probabilities probs = np.zeros_like(net.blobs['prob'].data) # Set the probability for our intended outcome to 1 probs[0][intended_outcome] = 1 # Do backpropagation to calculate the gradient for that outcome # and the image we put in gradient = net.backward(prob=probs) return gradient['data'].copy()

Slide 42

Slide 42 text

Using the gradient to tweak the image

Slide 43

Slide 43 text

Adding more gradients

Slide 44

Slide 44 text

Transforming a panda into a vulture

Slide 45

Slide 45 text

Panda gradient

Slide 46

Slide 46 text

Next Recurrent Neural Networks Unsupervised Learning Reinforcement Learning April 2017