0
0
Computer Visionml~10 mins

CNN architecture review in Computer Vision - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to add a convolutional layer with 32 filters and a 3x3 kernel.

Computer Vision
model.add(Conv2D([1], kernel_size=(3, 3), activation='relu', input_shape=(28, 28, 1)))
Drag options to blanks, or click blank then click option'
A32
B64
C16
D128
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing too few or too many filters like 16 or 128 which may underfit or overfit early.
Confusing kernel size with number of filters.
2fill in blank
medium

Complete the code to add a max pooling layer with pool size 2x2.

Computer Vision
model.add(MaxPooling2D(pool_size=[1]))
Drag options to blanks, or click blank then click option'
A(3, 3)
B(4, 4)
C(2, 2)
D(1, 1)
Attempts:
3 left
💡 Hint
Common Mistakes
Using (1, 1) which does not reduce size.
Using too large pool sizes like (4, 4) which may lose too much information.
3fill in blank
hard

Fix the error in the code to flatten the output before the dense layer.

Computer Vision
model.add([1]())
Drag options to blanks, or click blank then click option'
AFlatten
BDense
CConv2D
DMaxPooling2D
Attempts:
3 left
💡 Hint
Common Mistakes
Using Dense directly without flattening causes shape errors.
Using Conv2D or MaxPooling2D here is incorrect.
4fill in blank
hard

Fill both blanks to add a dropout layer with rate 0.5 and a dense output layer with 10 units.

Computer Vision
model.add(Dropout([1]))
model.add(Dense([2], activation='softmax'))
Drag options to blanks, or click blank then click option'
A0.5
B10
C5
D0.25
Attempts:
3 left
💡 Hint
Common Mistakes
Using dropout rates too low or too high.
Setting output units incorrectly for classification.
5fill in blank
hard

Fill all three blanks to compile the model with Adam optimizer, categorical crossentropy loss, and accuracy metric.

Computer Vision
model.compile(optimizer='[1]', loss='[2]', metrics=['[3]'])
Drag options to blanks, or click blank then click option'
Aadam
Bcategorical_crossentropy
Caccuracy
Dsgd
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong loss function like 'mse' for classification.
Choosing incorrect optimizer or metric.