2. About Me
Poo Kuan Hoong
● Google Developer Expert (GDE) in Machine Learning
● Principal Data Scientist - Coqnitics Sdn Bhd
● Principal Machine Learning Engineer - ADA
● Senior Data Scientist - ASEAN Data Analytics Exchange
(ADAX)
● Senior Manager Data Science – Nielsen
● Senior Lecturer – Multimedia University (MMU)
● Founded and managing Malaysia R User Group &
TensorFlow & Deep Learning Malaysia User Group
3. TensorFlow & Deep Learning Malaysia
USer Group
https://www.facebook.com/groups/TensorFlowMY/
5. Introduction
● TensorFlow’s initial release was 9th November 2015
● TensorFlow has grown to become one of the most loved and widely adopted
ML platforms in the world.
● This community includes:
○ Researchers
○ Developers
○ Companies
6. TensorFlow has changed alot...
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}))
8. TensorFlow 2.0 Features
TensorFlow 2.0 will focus on simplicity and ease of use, featuring updates like:
● Easy model building with Keras and eager execution.
● Robust model deployment in production on any platform.
● Powerful experimentation for research.
● Simplifying the API by cleaning up deprecated APIs and reducing duplication.
11. #1 Easy Model Building
● Keras will be the core API to build and train models
● Keras provides several model-building APIs (Sequential, Functional, and
Subclassing)
● TensorFlow’s implementation contains enhancements including eager
execution, for immediate iteration and intuitive debugging, and tf.data, for
building scalable input pipelines.
12. Features:
● Features:
a. Load your data using tf.data
b. Build, train and validate your model with tf.keras
c. Run and debug with eager execution, then use tf.function for the benefits
of graphs - TensorFlow 2.0 runs with eager execution by default
d. Use Distribution Strategies for distributed training support for a range of
hardware accelerators like CPUs, GPUs, and TPUs
e. Export to SavedModel - interchange format that can be used TensorFlow
Serving, TensorFlow Lite, TensorFlow.js, TensorFlow Hub, and more
* To find out more about eager execution: https://www.youtube.com/watch?v=T8AW0fKP0Hs
13. #2 Robust model deployment in
production on any platform
● TensorFlow 2.0, we’re improving compatibility and parity across platforms and
components by standardizing exchange formats and aligning APIs.
● Deployment Libraries:
a. TensorFlow Serving: A TensorFlow library allowing models to be served over HTTP/REST or
gRPC/Protocol Buffers
b. TensorFlow Lite: TensorFlow’s lightweight solution for mobile and embedded devices provides
the capability to deploy models on Android, iOS and embedded systems like a Raspberry Pi
and Edge TPUs.
c. TensorFlow.js: Enables deploying models in JavaScript environments, such as in a web
browser or server side through Node.js. TensorFlow.js also supports defining models in
JavaScript and training directly in the web browser using a Keras-like API.
14. #3: Powerful experimentation for
research
● TensorFlow 2.0 incorporates a number of features that enables the definition
and training
● TensorFlow 2.0 brings several new additions that allow researchers and
advanced users to experiment, using rich extensions like Ragged Tensors,
TensorFlow Probability (TFP), Tensor2Tensor
15. Differences between TensorFlow 1.x and
2.0
● TensorFlow 2.0 focuses on clean up and modularize the platform based on
semantic versioning
● Here are some of the larger changes coming:
○ Removal of queue runners in favor of tf.data.
○ Removal of graph collections.
○ Changes to how variables are treated.
○ Moving and renaming of API symbols.
○ tf.contrib will be removed from the core TensorFlow repository and build
process.
● A special interest group (SIG) has been formed to maintain and further
develop some of the more important contrib projects
16. Migration 1.x to 2.0
● There will be a conversion tool which updates TensorFlow 1.x Python code to
use TensorFlow 2.0 compatible APIs, or flags cases where code cannot be
converted automatically.
● Not all changes can be made completely automatically.
● URL:
https://github.com/tensorflow/docs/blob/master/site/en/r2/guide/upgrade.md
17.
18. TensorFlow 2.0 Timeline
● Roadmap URL: https://www.tensorflow.org/community/roadmap
● TensorFlow 2.0 is available for public preview now.
● For those that can’t wait, you can install it via:
> pip install tf-nightly-2.0-preview
● though probably a good idea to do it in a separate virtual environment.
19. TensorFlow 2.0 Community
If you are interested to be a contributor/tester:
Be part of the TensorFlow 2.0 testing group:
https://groups.google.com/a/tensorflow.org/forum/#!forum/testing
Or participate in the TensorFlow Developer Group:
https://groups.google.com/a/tensorflow.org/forum/#!forum/developers