deep learning for computer vision figure sevent channel of the act ivation of he first layer on he est cat pict ure this one looks like "bright green dotdetectoruseful to encode cat eyes at this pointlet' plot complete visualization of all the activations in the network (see figure you'll extract and plot every channel in each of the eight activation mapsand you'll stack the results in one big image tensorwith channels stacked side by side listing visualizing every channel in every int ermediat act ivat ion layer_names [for layer in model layers[: ]layer_names append(layer namenames of the layersso you can have them as part of your plot displays the feature maps images_per_row number of features in the feature map tiles the activation channels in this matrix post-processes the feature to make it visually palatable for layer_namelayer_activation in zip(layer_namesactivations)n_features layer_activation shape[- size layer_activation shape[ the feature map has shape ( sizesizen_featuresn_cols n_features /images_per_row display_grid np zeros((size n_colsimages_per_row size)for col in range(n_cols)tiles each filter into for row in range(images_per_row) big horizontal grid channel_image layer_activation[ ::col images_per_row rowchannel_image -channel_image mean(channel_image /channel_image std(channel_image * channel_image + channel_image np clip(channel_image astype('uint 'display_grid[col size (col sizerow size (row sizechannel_image scale size plt figure(figsize=(scale display_grid shape[ ]scale display_grid shape[ ])plt title(layer_nameplt grid(falseplt imshow(display_gridaspect='auto'cmap='viridis'licensed to displays the grid