Complete the code to create a Conv2D layer with 32 filters.
layer = tf.keras.layers.Conv2D([1], kernel_size=(3,3), activation='relu')
The number of filters in a Conv2D layer defines how many feature detectors it has. Here, 32 filters is the correct choice.
Complete the code to add padding to the Conv2D layer to keep the output size same as input.
layer = tf.keras.layers.Conv2D(32, kernel_size=(3,3), padding=[1], activation='relu')
Padding='same' adds zeros around the input so the output has the same width and height as the input.
Fix the error in the Conv2D layer that causes a shape mismatch.
layer = tf.keras.layers.Conv2D(64, kernel_size=[1], activation='relu')
The kernel_size must be a tuple of two integers, like (3, 3). Using a single integer or list causes errors.
Fill both blanks to create a Conv2D layer with 16 filters and stride of 2.
layer = tf.keras.layers.Conv2D([1], kernel_size=(3,3), strides=[2], activation='relu')
16 filters and strides of (2, 2) reduce the output size by skipping pixels.
Fill all three blanks to create a Conv2D layer with 64 filters, kernel size (5,5), and 'valid' padding.
layer = tf.keras.layers.Conv2D([1], kernel_size=[2], padding=[3], activation='relu')
64 filters, kernel size (5,5), and 'valid' padding means no padding, so output shrinks.