I have an error using MaxPooling2D in the conv_block function :
# if dropout_prob > 0 add a dropout layer, with the variable dropout_prob as parameter
if dropout_prob > 0:
conv = tf.keras.layers.Dropout(dropout_prob)
# if max_pooling is True add a MaxPooling2D with 2x2 pool_size
if max_pooling:
next_layer = tf.keras.layers.MaxPooling2D((2,2))
else:
next_layer = conv
skip_connection = conv
return next_layer, skip_connection
Error message :
AttributeError: âMaxPooling2Dâ object has no attribute âopâ