title: How does the second convolutional layer in tensorflow keras work?
body: <p>I have the fllowing model in keras. </p>
  
  <pre><code>model = Sequential()
  
  model.add(Conv2D(4, (3, 3), input_shape=input_shape, name='Conv2D_0', padding = 'same', use_bias=False, activation=None))
  model.add(MaxPooling2D(pool_size=(2, 2)))
  
  model.add(Conv2D(8, (3, 3), name='Conv2D_1', padding='same', use_bias=False, activation=None))
  model.add(MaxPooling2D(pool_size=(2, 2)))
  </code></pre>
  
  <p>input_shape is (32, 32). So, for the first layer, if I have a an image of size (32, 32), I get 4 images of size (32, 32). So the input image is convoluted with 4 diffrent kernels. After the pooling layer, I get 4 images of size (16, 16).</p>
  
  <p>The second convolutional layer gives me 8 images of size (16, 16). This layer has<br>
  4*8 kernels. The kernels have the size (3, 3, 4, 8). But I don't get, how the 8 output images are computed.</p>
  
  <p>I thought for example for the first image I can do sth like:
  H_i : i-th output image of the first Pooling layer
  Ker_i : i-th kernel. (:, :, i, 0)</p>
  
  <p>So the first output image of the second convolutional layer could be:
  conv(H_0, ker_0) + conv(H_1, ker_1) + conv(H_2, ker_2) + conv(H_3, ker_3)</p>
  
  <p>But this seems to be wrong.</p>
  
  <p>Can anyone explaine me, how the second conv-layer computes the output images?
  Thank you for your help.</p>