0

This Keras conv_filter_visualization example outputs an 8x8 grid of visualized weights for layer 5 of the VGG-16 network. The code goes through 128 of the 512 filters, and visualizes the weights of those which give the highest loss. An output example is here.

Why does each cell in the grid have a dimension of 128x128 pixels?

Layer 5 of VGG, has three 512x3x3 filters:

Block 5

x = Convolution2D(512, 3, 3, activation='relu', border_mode='same', name='block5_conv1')(x)
x = Convolution2D(512, 3, 3, activation='relu', border_mode='same', name='block5_conv2')(x)
x = Convolution2D(512, 3, 3, activation='relu', border_mode='same', name='block5_conv3')(x)
x = MaxPooling2D((2, 2), strides=(2, 2), name='block5_pool')(x)`

I am confused as to how these are visualized as 128x128 pixel cells.

John
  • 303
  • 2
  • 12

1 Answers1

0

The input to the network is a 128x128 greyscale image, so each cell in the visualization is the result of convolving the test image with one of the filters. The 64 most discriminative filters are shown.

John
  • 303
  • 2
  • 12