Number of filters = 16
Dimension of a single filter = 3,3
Number of color channels = 3
Number of bias terms = 1 for a single filter (this is constant)
Number of parameters for Conv2D = number of filters * (filter_dimension_rows, filter_dimension_columns * number_color_channels + 1)
= 16 * (3 * 3 * 3 + 1)
= 448
For the 2nd filter, the number of channels is 16. So, you’ll have
32 * (3 * 3 * 16 + 1)
= 4640 parameters.
Maxpooiling and Flatten don’t have any parameters since they have nothing to learn.
Dense layer calculation example
A single node in the dense layer is connected to all inputs from previous layer and has a bias term.
So, When we connect the flattened output of 256 to a dense layer of 512, we’ll have
256 * 512 connections and 512 bias terms
= 256 * 512 + 512
= 131584 parameters
To know these details, you should consider taking the deep learning specialization.