Top 7 changes or additions in TensorFlow 2.0

Dhiraj K
2 min readMar 18, 2019

--

In early March 2019 Tensor Flow 2.0 alpha is released.

Tensorflow is a framework for building machine learning models.

Photo by Tyler Easton on Unsplash

Below is the top 7 notable changes or additions in this new version of Tensorflow

  1. Eager Execution : with TensorFlow eager execution we can create tensors operations and various objects directly into Python, and run without the need to set up the usual session that we did before. TensorFlow eager execution is useful for debugging and it provides intuitive interface as well as provides natural control flow.

2. tf.contrib : The tf.contrib is removed and some of its components is moved into the TensorFlow core.

3. tf.app : The tf.app API is removed.

4. tf.flags : The tf.flags API is removed.

5. tf.logging : The tf.logging API is removed.

6. Global namespaces : TensorFlow 2.0 eliminates all global namespaces. Going forward we need to keep track of our code variables and if the code lose track of a tf.Variable, it gets garbage collected. Use Keras objects to help minimize the load of this extra tracking of variables. Every variable_scope can be converted to a Python object.

7. session.run() replacement: Every tf.Session.run call should be replaced by a Python function. This mechanism allows TensorFlow 2.0 to gain all of the benefits of graph mode.

Photo by Andreas Klassen on Unsplash

--

--

Dhiraj K
Dhiraj K

Written by Dhiraj K

Data Scientist & Machine Learning Evangelist. I love transforming data into impactful solutions and sharing my knowledge through teaching. dhiraj10099@gmail.com

No responses yet