3 Keras and data retrieval in TensorFlow 2.0
This chapter covers,
- Different APIs provided by Keras (i.e. Sequential, Functional and Sub-classing APIs)
- Using
tf.dataAPI, Keras data generators andtensorflow-datasetsto retrieve and manipulate persisted data
We have explored the nitty-gritties of the low-level TensorFlow API such as, defining tf.Variable objects and tf.Tensor objects which can be used to store things like numbers and strings. We also looked at some of the commonly used functionality provided in TensorFlow in the form of tf.Operation. Finally, we looked at some complex operations such as matrix multiplication and convolution in detail. If you analyze any standard deep neural network, you will see that they are made from standard mathematical operations such as matrix multiplication and convolution.
However, if you were to implement these networks using the low level TensorFlow API, you’ll find yourself replicating these operations in code many times, costing you valuable hours while making the code unmaintanable. But the good news is you don’t have to. TensorFlow provides a sub-module called Keras which takes care of this problem. Keras is a sub-library in TensorFlow that hides the former mentioned building blocks and provides a high-level API (Application Programming Interface) for developing machine learning models. In this chapter, we will see that Keras has several different APIs to choose from depending on the complexity of your solution.