Tensorflow 2.0 was recently announced by Google and it comes with quite a few disruptive changes with respect to both Tensorflow 1.x and Keras. In this 10 minutes talk I will guide you through this changes with example code and explain when and how you should use it to build your AI projects with Python.
6. Catalit LLC
Key points
• TF 1 to TF 2
• Eager execution
• Simplified APIs
• No more globals
• tf.function
• Architecture
• Better docs
7. Catalit LLC
TF 1 to TF 2
https://www.tensorflow.org/guide/migrate
https://www.tensorflow.org/guide/upgrade
Keep using TF 1.x syntax Upgrade script
8. Catalit LLC
Eager Execution
• Available since late 2017
• Following Pytorch and Chainer
• Imperative
• Define-by-run
• No static graph & session
9. Catalit LLC
Eager Execution
• Faster debugging with Python tools
• Dynamic models with Python control flow
• Support for custom and higher-order gradients
17. Catalit LLC
No more globals
• Global variables in the default graph
• If python ref is deleted, graph still lives
• You can re-access the var by name
• Keep track of your variables
• If you lose track of a tf.Variable, it gets
garbage collected.
TF1 TF2
18. Catalit LLC
tf.function
• Decorate a Python function
using tf.function() to mark it for JIT
compilation so that TensorFlow runs it as
a single graph: