The visualization of features directly can be less informative. Hence, we use the training procedure of backpropagation to activate the filters for better visualization. Since we pick what neurons are to be activated for backpropagation, it is called guided backpropagation. In this section, we will implement the guided backpropagation to visualize the features.
We will define the size and load the VGG model, as shown here:
image_width, image_height = 128, 128vgg_model = tf.keras.applications.vgg16.VGG16(include_top=False)
The layers are made of a dictionary with layer names as keys, and the layer from the model with weights as the key value for ease of access. Now we will take a first convolution layer from the fifth ...