U-Net conv_block

Hello

I have the following question from U-Net cone-block.

The function for the conv_block is

conv_block(inputs=None, n_filters=32, dropout_prob=0, max_pooling=True)

The output is as below

input_size=(96, 128, 3)
n_filters = 32
inputs = Input(input_size)
cblock1 = conv_block(inputs, n_filters * 1)
model1 = tf.keras.Model(inputs=inputs, outputs=cblock1)

output1 = [[‘InputLayer’, [(None, 96, 128, 3)], 0],
[‘Conv2D’, (None, 96, 128, 32), 896, ‘same’, ‘relu’, ‘HeNormal’],
[‘Conv2D’, (None, 96, 128, 32), 9248, ‘same’, ‘relu’, ‘HeNormal’],
[‘MaxPooling2D’, (None, 48, 64, 32), 0, (2, 2)]]

My question is how is the filter size 896, 9248 computed in the output?

Thank you so much

Arunima

Hi Arunima,

896 and 9248 refer to the number of parameters calculated for the layer.

The first Conv2D is convolving 32 filters with size 3x3x3. This gives 32x3x3x3 + 32 (bias) parameters = 896 parameters.

The second Conv2D is convolving 32 filters with size 3x3x32 (to match the output volume of the previous Conv2D). This gives 32x3x3x32 + 32 parameters = 9248 parameters.

2 Likes

Thank you so much for your response.

1 Like