TensorFlow and its ecosystem
AI Day Rome (September 13)
Simone Scardapane
Something about myself
Research fellow @ Sapienza (deep learning)�Google Developer Expert in machine learning�Co-founder of Italian Association for Machine Learning
Training Phase
Answers
Data
Rules
Machine Learning
Model
Data
Predictions
Inference Phase
2010
2013
2014
2015
2016
2018
2017
...
The evolution of DL frameworks
Source: Open-Source Frameworks for Deep Learning: an Overview (Vincenzo Lomonaco)
Source: Deep Learning Framework Power Scores 2018 (Towards Data Science)
17.5M | 39000 |
Downloads | Commits |
1600 | 11500 |
Contributors | Issues Responded |
Brief intro to TF
x = tf.placeholder(tf.float32, [None, 200])
W = tf.Variable(tf.zeros([200, 10]))
b = tf.Variable(tf.zeros([10]))
y = tf.nn.softmax(tf.matmul(x, W) + b)
…
with tf.Session() as sess:
sess.run(tf.initialize_all_variables())
tf.train.start_queue_runners(sess)
example_batch = tf.train.batch([x], batch_size=10, num_threads=4, capacity=10)
max_steps = 1000
for step in range(max_steps):
x_in = sess.run(example_batch)
sess.run(train_step, feed_dict={x: train_data, y_: train_labels})
if (step % 100) == 0:
print(step, sess.run(accuracy, feed_dict={x: test_data, y_: test_labels}))
TensorFlow has grown impressively
TensorFlow Distributed Execution Engine
CPU
GPU
TPU
Mobile
Embedded
Neural Nets
C++
K-Means
Loss Functions, Metrics
Linear Algebra
Decision Trees
SVM
Gaussian Mixture Models
Regression
Random Forests
Probabilistic Methods
Signal Processing
Lattice
TensorFlow is a comprehensive ML framework
Python
Java
Javascript
Training + deployment
Source: What’s coming in TensorFlow 2.0
TensorFlow 2.0 focuses on:
An example with text embedding
import tensorflow_hub as hub�embedder = hub.Module("https://tfhub.dev/google/universal-sentence-encoder/2")��embed = embedder(["How you doin'?"]) # [1, 512] vector of float32 values
Cloud capabilities and enhancements
Notebook time!
Thanks for listening! :-)�Shameful ad: http://iaml.it/member