introduction to neural networks - dmitry efimovefimov-ml.com/pdfs/aus_nn_2016.pdf · artificial...

16
Introduction to Neural Networks Dmitry Efimov April 28, 2016

Upload: haanh

Post on 27-Jul-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Introduction toNeural Networks

Dmitry Efimov

April 28, 2016

Page 2: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Outline

Biological neural network

Artificial neural network

ANN in use

Page 3: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

How does our brain work?

Page 4: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Biological neuron

Dmitry Efimov
Page 5: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Comparison between brain and computer

Brain Computer

No. of processing units ⇡ 1011 ⇡ 109

Type of processing units Neurons TransistorsType of calculation massively parallel usually serial

Data storage associative address-basedSwitching time ⇡ 10�3 s ⇡ 10�9 s

Possible switchingoperations ⇡ 1013 s�1 ⇡ 1018 s�1

Actual switchingoperations ⇡ 1012 s�1 ⇡ 1010 s�1

Page 6: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Quiz

Q1 [5 points]. Determine the animals on the pictures:

Q2 [5 points]. Find the answer without calculator:

12 346 238 ⇥ 982 283 129 + 261 123 238239 329

=

Page 7: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Artificial neural network

Hiddenlayer

Inputlayer

Outputlayer

2

1

�1

3

�1

�2

1

2

8

�1

�6

I 8 = 1 · 2 + 2 · 3I �1 = 1 · 1 + 2 · (�1)I �6 = 8 · (�1) + (�1) · (�2)

Page 8: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Artificial neural network: components

x0

x1

x2

x3

I neuronsI layersI weightsI activation functions

Page 9: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Example 1: make a light robot

I both bulbs are off ) robot turns on the first bulbI both bulbs are on ) robot turns off the second bulbI otherwise ) robot does nothing

Page 10: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Example 2: solution with ANN

Bulbs are off:

0

01

Bulbs are on:

1

1�1

First bulb is on:

1

00

Second bulb is on:

0

10

Page 11: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Example 2: how to find weights

I Bulbs are off:1 = w3 · a(w11 · 0 + w12 · 0) + w4 · a(w21 · 0 + w22 · 0)

I Bulbs are on:�1 = w3 · a(w11 · 1 + w12 · 1) + w4 · a(w21 · 1 + w22 · 1)

I First bulb is on:0 = w3 · a(w11 · 1 + w12 · 0) + w4 · a(w21 · 1 + w22 · 0)

I Second bulb is on:0 = w3 · a(w11 · 0 + w12 · 1) + w4 · a(w21 · 0 + w22 · 1)

Page 12: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Example 2: solve the Q1 for our Quiz

Q1 [5 points]. Determine the animals on the pictures:

Page 13: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Example 2: convolutional neural networks

I each picture can be represented as a matrix of pixels

I CNN splits picture in patches:

I nice visualization

Page 14: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Where we can use neural networks?

I image recognition

I voice recognition

I text classification

I video recognition

I reinforcement learning

I . . .

Page 15: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Bonus example: left ventricle detection

Page 16: Introduction to Neural Networks - Dmitry Efimovefimov-ml.com/pdfs/AUS_NN_2016.pdf · Artificial neural network: components x0 x1 x2 x3 I neurons I layers ... solve the Q1 for our

Thank you! Questions?

Dmitry [email protected]

kaggle.com/efimov

github.com/diefimov