0
0
Computer Visionml~10 mins

Why architecture design impacts performance in Computer Vision - Test Your Understanding

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

Complete the code to create a simple convolutional layer in a neural network.

Computer Vision
conv_layer = nn.Conv2d(in_channels=3, out_channels=16, kernel_size=[1])
Drag options to blanks, or click blank then click option'
A1
B5
C7
D3
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing kernel size 1 which is too small to capture features.
Using kernel size 7 which may be too large for simple tasks.
2fill in blank
medium

Complete the code to add a ReLU activation after a convolutional layer.

Computer Vision
model = nn.Sequential(
    nn.Conv2d(3, 16, 5),
    [1]()
)
Drag options to blanks, or click blank then click option'
ASoftmax
BSigmoid
CReLU
DTanh
Attempts:
3 left
💡 Hint
Common Mistakes
Using Sigmoid which can cause vanishing gradients.
Using Softmax which is for output layers in classification.
3fill in blank
hard

Fix the error in the code to correctly flatten the output before a fully connected layer.

Computer Vision
x = x.view(x.size(0), [1])
Drag options to blanks, or click blank then click option'
A-1
B1
C0
Dx.size(1)
Attempts:
3 left
💡 Hint
Common Mistakes
Using 1 or 0 which causes shape mismatch errors.
Using x.size(1) which only flattens one dimension.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps layer names to their output sizes if size is greater than 100.

Computer Vision
layer_sizes = {name: size for name, size in layers.items() if size [1] 100 and 'conv' [2] name}
Drag options to blanks, or click blank then click option'
A>
B<
Cin
Dnot in
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' which selects smaller sizes.
Using 'not in' which excludes 'conv' layers.
5fill in blank
hard

Fill all three blanks to create a dictionary of layer outputs where output size is less than 50 and layer name contains 'pool'.

Computer Vision
filtered_outputs = { [1]: [2] for [3] in outputs.items() if [2] < 50 and 'pool' in [1] }
Drag options to blanks, or click blank then click option'
Aname
Boutput
Cname, output
Dlayer
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'layer' which is undefined.
Mixing variable names inconsistently.