Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

tf.name_scope Vikram Tiwari @Vikram_Tiwari !Expert

Slide 3

Slide 3 text

repository in “machine learning” category on GitHub #1

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

A multidimensional array. A graph of operations.

Slide 6

Slide 6 text

Multidimensional Arrays

Slide 7

Slide 7 text

Graph You define the graph in high-level language (Python) Graph is compiled and optimized Graph is executed (in part, or fully) on devices Nodes represent computations Data (tensors) flows between them

Slide 8

Slide 8 text

With special operations for deep learning Similar to NumPy Numpy TensorFlow add mul matmul … sum … add multiply matmul … reduce_sum … sigmoid relu …

Slide 9

Slide 9 text

Dataflow computation Python Program TensorFlow Graph https://www.tensorflow.org/get_started/get_started

Slide 10

Slide 10 text

Linear Regression y = mx + b input parameters result

Slide 11

Slide 11 text

Inference import tensorflow as tf x = tf.placeholder(shape=[None], dtype=tf.float32) m = tf.Variable(tf.random_normal([1])) b = tf.Variable(tf.random_normal([1])) y = m * x + b with tf.Session() as sess: sess.run(tf.initialize_all_variables()) print(sess.run(y, feed_dict={x: x_in})) Build the graph Prepare execution env Initialize variables Run the computation

Slide 12

Slide 12 text

Loss, Gradient Descent parameter #1 loss parameter #2

Slide 13

Slide 13 text

Putting it together loss = tf.reduce_mean(tf.square(y - y_train)) optimizer = tf.train.GradientDescentOptimizer(0.5) train = optimizer.minimize(loss) with tf.Session() as sess: sess.run(tf.global_variable_initalizer()) for i in range(1000): sess.run(train, feed_dict={x: x_data[i], y_label: y_data[i]}) Define a loss Create an optimizer Op to minimize the loss Iteratively run the training op Initialize variables

Slide 14

Slide 14 text

Playground http://playground.tensorflow.org/ Demo

Slide 15

Slide 15 text

TensorFlow Distributed Execution Engine CPU GPU Android iOS ... C++ Frontend Python Frontend ... Layers Estimator Models in a box Train and evaluate models Build models Keras Model Canned Estimators

Slide 16

Slide 16 text

Estimator inputs, labels fit() model_fn predict() evaluate() Sessions, Graphs, Loops export_savedmodel()

Slide 17

Slide 17 text

TensorBoard

Slide 18

Slide 18 text

Distributed By Kaewkasi at English Wikipedia, CC BY-SA 3.0, https://goo.gl/PD1K2N

Slide 19

Slide 19 text

TensorFlow Serving

Slide 20

Slide 20 text

Who uses it? #google Search Gmail Translate Maps Android Photos Speech YouTube Play … many others ... Production use in many areas: Internal TensorFlow launch Research use for: 100s of projects and papers

Slide 21

Slide 21 text

Transfer Learning https://github.com/VikramTiwari/tensorflow-retrain-sample Demo

Slide 22

Slide 22 text

Next Steps Tutorials and code tensorflow.org Intro to Deep Learning with TensorFlow Udacity class goo.gl/iHssII Stanford’s CS231n cs231n.github.io Udacity’s Machine Learning Nanodegree goo.gl/ODpXj4 Totally new to ML? Recipes goo.gl/KewA03

Slide 23

Slide 23 text

Thank you! Vikram Tiwari @Vikram_Tiwari