deep learning for computer vision visualizing what convnets learn it' often said that deep-learning models are "black boxes"learning representations that are difficult to extract and present in human-readable form although this is partially true for certain types of deep-learning modelsit' definitely not true for convnets the representations learned by convnets are highly amenable to visualizationin large part because they're representations of visual concepts since wide array of techniques have been developed for visualizing and interpreting these representations we won' survey all of thembut we'll cover three of the most accessible and useful onesvisualizing intermediate convnet outputs (intermediate activations)--useful for understanding how successive convnet layers transform their inputand for getting first idea of the meaning of individual convnet filters visualizing convnets filters--useful for understanding precisely what visual pattern or concept each filter in convnet is receptive to visualizing heatmaps of class activation in an image--useful for understanding which parts of an image were identified as belonging to given classthus allowing you to localize objects in images for the first method--activation visualization--you'll use the small convnet that you trained from scratch on the dogs-versus-cats classification problem in section for the next two methodsyou'll use the vgg model introduced in section visualizing intermediate activations visualizing intermediate activations consists of displaying the feature maps that are output by various convolution and pooling layers in networkgiven certain input (the output of layer is often called its activationthe output of the activation functionthis gives view into how an input is decomposed into the different filters learned by the network you want to visualize feature maps with three dimensionswidthheightand depth (channelseach channel encodes relatively independent featuresso the proper way to visualize these feature maps is by independently plotting the contents of every channel as image let' start by loading the model that you saved in section from keras models import load_model model load_model('cats_and_dogs_small_ 'model summary(as reminder layer (typeoutput shape param ===============================================================conv d_ (conv (none maxpooling d_ (maxpooling (none conv d_ (conv (none maxpooling d_ (maxpooling (none licensed to