0
0
Computer Visionml~10 mins

EfficientNet scaling 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 EfficientNet model from TensorFlow Keras applications.

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

Complete the code to create an EfficientNetB0 model with imagenet weights and include the top classification layer.

Computer Vision
model = EfficientNetB0(weights=[1], include_top=True)
Drag options to blanks, or click blank then click option'
ANone
B'imagenet'
C'random'
D'custom'
Attempts:
3 left
💡 Hint
Common Mistakes
Using None or other strings which do not load pretrained weights.
3fill in blank
hard

Fix the error in the code to scale EfficientNet width and depth correctly using compound scaling.

Computer Vision
def scale_effnet(width_coefficient, depth_coefficient, [1]):
Drag options to blanks, or click blank then click option'
Aresolution
Bdropout_rate
Cbatch_size
Dinput_shape
Attempts:
3 left
💡 Hint
Common Mistakes
Using dropout_rate or batch_size which are unrelated to scaling input size.
4fill in blank
hard

Fill both blanks to complete the function that calculates scaled filters and blocks for EfficientNet.

Computer Vision
def scale_filters(filters, [1]):
    return int(filters * [2])
Drag options to blanks, or click blank then click option'
Awidth_coefficient
Bdepth_coefficient
Dresolution
Attempts:
3 left
💡 Hint
Common Mistakes
Using depth_coefficient or resolution to scale filters.
5fill in blank
hard

Fill all three blanks to complete the function that scales the number of blocks in EfficientNet using depth coefficient and rounds up.

Computer Vision
import math

def scale_blocks([1], [2]):
    scaled = blocks * depth_coefficient
    return math.ceil(scaled)
Drag options to blanks, or click blank then click option'
Ablocks
Bdepth_coefficient
Cmath
Dwidth_coefficient
Attempts:
3 left
💡 Hint
Common Mistakes
Using width_coefficient instead of depth_coefficient.
Not importing math module.