Getting Your Hands Dirty With TensorFlow 2.0 and Keras API

Getting Your Hands Dirty With TensorFlow 2.0 and Keras API

TensorFlow 2.0 comes with Keras packaged inside, so there is no need to import Keras as a separate module (although you can do this if you need). The TensorFlow 2.0 API is simplified and improved. This is good news for us machine learning developers.

This is how you import Keras from TensorFlow:

TensorFlow 2.0: Dynamic, Readable, and Highly Extended

TensorFlow 2.0 Introduction

Considering learning a new Python framework for deep learning? If you already know some TensorFlow and are looking for something with a little more dynamism, you no longer have to switch all the way to PyTorch thanks to some substantial changes coming as part of TensorFlow 2.0. In fact, many of the changes in 2.0 specifically address the alleged shortcomings of TensorFlow.

With eager execution by default, you no longer have to pre-define a static graph, initialize sessions, or worry about tensors falling outside of the proper scope when you get over-zealous in your object-oriented principles. TensorFlow still has about 3 times the user base of PyTorch (judging from the repositories on GitHub referencing each framework), and that means more extensions, more tutorials, and more developers collaboratively exploring the space of all possible code errors on Stack Overflow. You’ll also find that despite the major changes starting with TensorFlow 2.0, the project developers have taken many steps to ensure that backwards compatibility can be maintained.