Slide 1

Slide 1 text

Sorting Hat with TensorFlow Jorge Juan Barroso Carmona [email protected] @flipper83 +JorgeJBarroso Android Expert Android GDE

Slide 2

Slide 2 text

Testing for android & iOS. Trainings Architecture, Patterns and principles for Android & iOS. Mastering Git. Advanced mobile development. Testing for android & iOS. Architecture, Patterns and principles for Android & iOS. Companies For Everybody

Slide 3

Slide 3 text

The best mobile app performance monitoring tool.

Slide 4

Slide 4 text

Adam Tornhill “Of course it is happening inside your mobile, Harry,but why on earth should that mean that it is not real?” J.K Rowling and Jorge Barroso, Harry Potter and the deathly Hallows

Slide 5

Slide 5 text

Sorting Hat

Slide 6

Slide 6 text

The Sorting Hat is one of the cleverest enchanted objects most witches and wizards will ever meet. It literally contains the intelligence of the four founders.

Slide 7

Slide 7 text

www.tiny.cc/sortingHat

Slide 8

Slide 8 text

https://github.com/flipper83/SortingHatAndroid

Slide 9

Slide 9 text

www.tiny.cc/sortingHat

Slide 10

Slide 10 text

Neural Nets

Slide 11

Slide 11 text

Deep Learning

Slide 12

Slide 12 text

Classification Discovery

Slide 13

Slide 13 text

x1 x2 x3 x4 w1 w2 w3 w4 w5 w6 w7 w8 w9

Slide 14

Slide 14 text

x1 x2 w1 w2 b1 y = x1*w1 + x2*w2 + b1 Activation function TRY sigmoid functions instead lineal

Slide 15

Slide 15 text

b1

Slide 16

Slide 16 text

x1 x2 x3 x4 Training Hidden Layers 1/2(error)2 Accuracy Error

Slide 17

Slide 17 text

x1 x2 x3 x4 Validation (backpropagation) Hidden Layers Accuracy Error

Slide 18

Slide 18 text

Convolutional Networks

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

https://ujjwalkarn.me/2016/08/11/intuitive-explanation-convnets/

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Adam Tornhill Multidimensional array Computational Graph

Slide 27

Slide 27 text

Tensors Transform information Into dimensional matrix

Slide 28

Slide 28 text

Tensors

Slide 29

Slide 29 text

SHAPE RANK TYPE

Slide 30

Slide 30 text

2D 480x320 float32

Slide 31

Slide 31 text

Variables Are the way the have To give importance to data structures

Slide 32

Slide 32 text

Variables

Slide 33

Slide 33 text

MINIMIZATION RESTORE SAVING

Slide 34

Slide 34 text

Neural Nets Are the structures for building Core deep learning models

Slide 35

Slide 35 text

Neural Nets

Slide 36

Slide 36 text

ACTIVATION FUNCTION HIDDEN LAYERS OPTIMIZERS

Slide 37

Slide 37 text

ReLU [50,100,50] Gradient descent

Slide 38

Slide 38 text

The Sorting Hat

Slide 39

Slide 39 text

INCEPTION 2.Retrain the model

Slide 40

Slide 40 text

1.Gather images

Slide 41

Slide 41 text

/retrained_graph_optimized.pb /retrained_labels.txt 4.Import the model in Android application

Slide 42

Slide 42 text

5. Write some code

Slide 43

Slide 43 text

classifier = TensorFlowImageClassifier.create( getAssets(), MODEL_FILE, LABEL_FILE, INPUT_SIZE, IMAGE_MEAN, IMAGE_STD, INPUT_NAME, OUTPUT_NAME); private static final float IMAGE_STD = 128; protected static final int INPUT_SIZE = 299; protected static final int IMAGE_MEAN = 128; private static final String MODEL_FILE = "file:/// android_asset/retrained_graph_optimized.pb"; private static final String LABEL_FILE = "file:/// android_asset/retrained_labels.txt";

Slide 44

Slide 44 text

final List results = classifier.recognizeImage(croppedBitmap); for (Classifier.Recognition result : results) { Log.d(result.getTitle() + " " + result.getConfidence()); }

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

Bibliography They’re the cracks! Peter Warden. Tensorflow mobile for Poets 2016 Hello word with Tensorflow Introduction to Tensorflow. Gema Parreño medium 2016 Pottermore. JKRowling https://rubenlopezg.wordpress.com/2014/05/07/que-es-y-como- funciona-deep-learning/ https://ujjwalkarn.me/2016/08/11/intuitive-explanation-convnets/ https://cloud.google.com/blog/big-data/2016/07/understanding- neural-networks-with-tensorflow-playground http://nilhcem.com/android/custom-tensorflow-classifier http://www.asimovinstitute.org/neural-network-zoo

Slide 47

Slide 47 text

Find me I am very social! [email protected] @flipper83 Questions?

Slide 48

Slide 48 text

No content