Complete the code to import the EfficientNet model from TensorFlow Keras applications.
from tensorflow.keras.applications import [1]
The EfficientNetB0 model is imported from tensorflow.keras.applications to use EfficientNet architecture.
Complete the code to create an EfficientNetB0 model with imagenet weights and include the top classification layer.
model = EfficientNetB0(weights=[1], include_top=True)
Using weights='imagenet' loads pretrained weights from ImageNet dataset for EfficientNetB0.
Fix the error in the code to scale EfficientNet width and depth correctly using compound scaling.
def scale_effnet(width_coefficient, depth_coefficient, [1]):
The resolution parameter is needed to scale the input image size in EfficientNet compound scaling.
Fill both blanks to complete the function that calculates scaled filters and blocks for EfficientNet.
def scale_filters(filters, [1]): return int(filters * [2])
The width_coefficient is used to scale the number of filters in EfficientNet.
Fill all three blanks to complete the function that scales the number of blocks in EfficientNet using depth coefficient and rounds up.
import math def scale_blocks([1], [2]): scaled = blocks * depth_coefficient return math.ceil(scaled)
The function takes blocks and depth_coefficient to scale and round up the number of blocks.