Complete the code to import the main CNN layer used for image classification.
from tensorflow.keras.layers import [1]
The Conv2D layer is the core building block of CNNs for image data.
Complete the code to add a convolutional layer with 32 filters and a 3x3 kernel.
model.add(Conv2D([1], kernel_size=(3, 3), activation='relu'))
32 filters is a common choice for the first convolutional layer.
Fix the error in the code to correctly flatten the output before the dense layer.
model.add([1]())Flatten converts the 2D feature maps into a 1D vector for the dense layer.
Fill both blanks to compile the CNN model with Adam optimizer and categorical crossentropy loss.
model.compile(optimizer=[1], loss=[2], metrics=['accuracy'])
Adam optimizer and categorical crossentropy loss are standard for multi-class image classification.
Fill all three blanks to create a dictionary comprehension that maps image labels to their counts if count is greater than 10.
label_counts = { [1]: [2] for [3] in labels if labels[[3]] > 10 }This comprehension creates a dictionary with labels as keys and their counts as values, filtering counts greater than 10.