Number of images created by convolution layer

tf.keras.layers.Convo2D( filters = 64 , kernel_size = ( 3 , 3 ) , activation = ‘relu’ , input_shape= ( 28 , 28 , 1 ) )

As I have learned, this code will create 64 different convolutions / filters and apply these and create 64 different images.

Now my question is , If I add 2 of this convolution layer how many image will it create??

As per my understanding, the first layer with 64 convolution will create 64 images and the second layer with 64 convolution will be applied to all the 64 previous image. So the resultant number of images will be
64 * 64 = 4096.

Please clarify this.

Hello @Shreyash_Gupta

You may be having some confusion about what the Convolutional layer does, it just extracts some important features from the Image and doesn’t multiply images.

And this video can give you a basic understanding of the Conv2d layer Introducing convolutional neural networks (ML Zero to Hero - Part 3)

Best,
Felix

1 Like

Thank you, this video was very helpful.
I just have one doubt.

In the video the mentor mentioned that 64 filters will be created and applied to the image. Then the filter with the best signal will be selected. This happen in an epoch.

My question is that, In the second and rest of the epoch , another set of filters will be generated and the filter with the best signal will be selected?
How does it determine which filter should be selected

1 Like

As you have seen after every convolution we add a pooling layer that helps to reduce the feature maps. The output of this layer is a summarised parameter set of an Image that can be fed to the next Convolution. And means the filtering also here is applied to new summarised parameters. For choosing the filter size you can’t be specific on how to choose the value but practically the filter size is in numbers 32, 64, 128, 256, 512, etc. The values which can fit in your CPU/ GPU

1 Like

Thank you for the clarification.