In this section, we'll implement the two transfer learning scenarios again, but this time using TensorFlow 2.0.0 (TF). In this way, we can compare the two libraries. Instead of ResNet18, we'll use the ResNet50V2 architecture (more on that in the Chapter 3, Advanced Convolutional Networks). In addition to TF, this example also requires the TF Datasets 1.3.0 package (https://www.tensorflow.org/datasets), a collection of various popular ML datasets.
With that, let's get started:
- As usual, first, we need to do the imports:
import matplotlib.pyplot as pltimport tensorflow