0
0
Prompt Engineering / GenAIml~10 mins

Why architecture choices affect scalability in Prompt Engineering / GenAI - 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 neural network layer using the correct activation function.

Prompt Engineering / GenAI
layer_output = activation([1](inputs))
Drag options to blanks, or click blank then click option'
Arelu
Bsigmoid
Csoftmax
Dtanh
Attempts:
3 left
💡 Hint
Common Mistakes
Using relu or softmax here would change the output range and behavior.
2fill in blank
medium

Complete the code to define the batch size for training a model.

Prompt Engineering / GenAI
model.fit(data, labels, batch_size=[1])
Drag options to blanks, or click blank then click option'
A1000
B1
C32
D5000
Attempts:
3 left
💡 Hint
Common Mistakes
Using very large batch sizes can cause memory issues.
3fill in blank
hard

Fix the error in the code to correctly initialize a scalable model architecture.

Prompt Engineering / GenAI
model = Sequential()
model.add(Dense(64, activation=[1]))
Drag options to blanks, or click blank then click option'
A'relu'
Brelu
C"relu"
Drelu()
Attempts:
3 left
💡 Hint
Common Mistakes
Passing relu without quotes causes a NameError.
4fill in blank
hard

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

Prompt Engineering / GenAI
layer_sizes = {layer[1]: size for layer, size in layers.items() if size [2] 100}
Drag options to blanks, or click blank then click option'
A.upper()
B>
C<
D.lower()
Attempts:
3 left
💡 Hint
Common Mistakes
Using < instead of > will select wrong layers.
5fill in blank
hard

Fill all three blanks to create a dictionary that maps model names in uppercase to their accuracy scores only if accuracy is above 0.8.

Prompt Engineering / GenAI
accuracies = [1]{name[2]: score for name, score in results.items() if score [3] 0.8}
Drag options to blanks, or click blank then click option'
Adict(
Bupper()
C>
Dlower()
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting dict( causes a syntax error.
Using lower() changes names incorrectly.