TensorFlow: neural networks lab
Paolo Dragone and Andrea Passerini
paolo.dragone@unitn.it passerini@disi.unitn.it
Machine Learning
Dragone, Passerini (DISI) TensorFlow Machine Learning 1 / 28
TensorFlow: neural networks lab Paolo Dragone and Andrea Passerini - - PowerPoint PPT Presentation
TensorFlow: neural networks lab Paolo Dragone and Andrea Passerini paolo.dragone@unitn.it passerini@disi.unitn.it Machine Learning Dragone, Passerini (DISI) TensorFlow Machine Learning 1 / 28 Introduction TensorFlow TensorFlow is a Python
Dragone, Passerini (DISI) TensorFlow Machine Learning 1 / 28
Introduction
Dragone, Passerini (DISI) TensorFlow Machine Learning 2 / 28
Introduction
I https://www.tensorflow.org/versions/master/tutorials/
I https://www.tensorflow.org/versions/master/tutorials/
I https://www.tensorflow.org/versions/master/tutorials/
Dragone, Passerini (DISI) TensorFlow Machine Learning 3 / 28
Introduction
Dragone, Passerini (DISI) TensorFlow Machine Learning 4 / 28
MNIST dataset
Dragone, Passerini (DISI) TensorFlow Machine Learning 5 / 28
MNIST dataset
I mnist.train.images I mnist.train.labels I mnist.train.next batch(n) I . . . Dragone, Passerini (DISI) TensorFlow Machine Learning 6 / 28
MNIST dataset
Dragone, Passerini (DISI) TensorFlow Machine Learning 7 / 28
Softmax regressions
Dragone, Passerini (DISI) TensorFlow Machine Learning 8 / 28
Softmax regressions
Dragone, Passerini (DISI) TensorFlow Machine Learning 9 / 28
Softmax regressions
Dragone, Passerini (DISI) TensorFlow Machine Learning 10 / 28
Softmax regressions
Dragone, Passerini (DISI) TensorFlow Machine Learning 11 / 28
Softmax regressions
Dragone, Passerini (DISI) TensorFlow Machine Learning 12 / 28
Deep convolutional net
I 2 convolutional layers I alternated with 2 max pool layers I ReLU layer (with dropout) I Softmax regressions
Dragone, Passerini (DISI) TensorFlow Machine Learning 13 / 28
Deep convolutional net
convolutional max pool convolutional max pool ReLU (dropout) softmax
x1 x1 x2 x2 x784 x784 . . . ˆ y0 ˆ y0 ˆ y1 ˆ y1 ˆ y9 ˆ y9 . . .
Dragone, Passerini (DISI) TensorFlow Machine Learning 14 / 28
Deep convolutional net
convolutional max pool convolutional max pool ReLU (dropout) softmax
x1 x1 x2 x2 x784 x784 . . . ˆ y0 ˆ y0 ˆ y1 ˆ y1 ˆ y9 ˆ y9 . . .
Dragone, Passerini (DISI) TensorFlow Machine Learning 15 / 28
Deep convolutional net
convolutional max pool convolutional max pool ReLU (dropout) softmax
x1 x1 x2 x2 x784 x784 . . . ˆ y0 ˆ y0 ˆ y1 ˆ y1 ˆ y9 ˆ y9 . . .
Dragone, Passerini (DISI) TensorFlow Machine Learning 16 / 28
Deep convolutional net
convolutional max pool convolutional max pool ReLU (dropout) softmax
x1 x1 x2 x2 x784 x784 . . . ˆ y0 ˆ y0 ˆ y1 ˆ y1 ˆ y9 ˆ y9 . . .
Dragone, Passerini (DISI) TensorFlow Machine Learning 17 / 28
Deep convolutional net
Dragone, Passerini (DISI) TensorFlow Machine Learning 18 / 28
Deep convolutional net
Dragone, Passerini (DISI) TensorFlow Machine Learning 19 / 28
Deep convolutional net
Dragone, Passerini (DISI) TensorFlow Machine Learning 20 / 28
Deep convolutional net
Dragone, Passerini (DISI) TensorFlow Machine Learning 21 / 28
Deep convolutional net
Dragone, Passerini (DISI) TensorFlow Machine Learning 22 / 28
Deep convolutional net
Dragone, Passerini (DISI) TensorFlow Machine Learning 23 / 28
Deep convolutional net
Dragone, Passerini (DISI) TensorFlow Machine Learning 24 / 28
Assignment
Dragone, Passerini (DISI) TensorFlow Machine Learning 25 / 28
Assignment
1 Remove the 1st layer: convolutional and max pooling 2 Train and test the network 3 Remove the 2nd layer: convolutional and max pooling 4 Train and test the network 5 Remove the 3rd layer: ReLU with dropout 6 Train and test the network
Dragone, Passerini (DISI) TensorFlow Machine Learning 26 / 28
Assignment
I the Python code F model no1.py (model without the 1st layer) F model no2.py (model without the 2nd layer) F model no3.py (model without the 3rd layer) I the report (PDF format)
Dragone, Passerini (DISI) TensorFlow Machine Learning 27 / 28
References
Dragone, Passerini (DISI) TensorFlow Machine Learning 28 / 28