0
0
Computer Visionml~10 mins

Inception modules 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 import the InceptionV3 model from Keras applications.

Computer Vision
from tensorflow.keras.applications import [1]
Drag options to blanks, or click blank then click option'
AResNet50
BMobileNet
CInceptionV3
DVGG16
Attempts:
3 left
💡 Hint
Common Mistakes
Importing a different model like ResNet50 or VGG16 instead of InceptionV3.
2fill in blank
medium

Complete the code to create an InceptionV3 model without the top classification layer.

Computer Vision
model = InceptionV3(weights='imagenet', include_top=[1])
Drag options to blanks, or click blank then click option'
ATrue
BNone
C'imagenet'
DFalse
Attempts:
3 left
💡 Hint
Common Mistakes
Setting include_top=True which keeps the original classification layers.
3fill in blank
hard

Fix the error in the code to add a global average pooling layer after the Inception base.

Computer Vision
from tensorflow.keras.layers import GlobalAveragePooling2D
x = model.output
x = [1](x)
Drag options to blanks, or click blank then click option'
AGlobalAveragePooling2D
BDense
CGlobalMaxPooling2D
DFlatten
Attempts:
3 left
💡 Hint
Common Mistakes
Using Dense or Flatten which are not pooling layers.
Using GlobalMaxPooling2D which uses max instead of average.
4fill in blank
hard

Fill both blanks to add a dense output layer with 10 classes and softmax activation.

Computer Vision
from tensorflow.keras.layers import Dense
outputs = Dense([1], activation=[2])(x)
Drag options to blanks, or click blank then click option'
A10
B'softmax'
C'relu'
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using relu activation in the output layer.
Setting units to 1 instead of 10.
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'
A'adam'
B'categorical_crossentropy'
C'accuracy'
D'mse'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'mse' loss which is for regression.
Using wrong metric like 'mse' instead of 'accuracy'.