Training our own TensorFlow model
Building our own custom model requires following a step-by-step procedure. To begin, we are going to use the TensorFlow Hub to feed images using pre-trained models.
Note
TensorFlow Hub is a library for the publication, discovery, and consumption of reusable parts of machine learning models. A module is a self-contained piece of a TensorFlow graph, along with its weights and assets, that can be reused across different tasks in a process known as transfer learning.
Installing TensorFlow
While writing this book, TensorFlow 1.7.0 was available. The TensorFlow Hub has a dependency on the TensorFlow library and can be installed with pip
as follows:
$ pip install "tensorflow>=1.7.0" $ pip install tensorflow-hub
When the TensorFlow library is installed, we need to start collecting our image dataset before the training process starts. We need to look into a lot of things before beginning our training.
Training the images
In this step, we will collect the images and...