AI & ML Code Completion Medium +20 XP
Model Compile
Complete the Keras model compilation.
AI & MLFill in the blank
model.___(optimizer="adam", loss="sparse_categorical_crossentropy", metrics=["accuracy"])Type the missing code
Show answer and explanation
Answer: compile
compile() configures the model for training by specifying the optimizer, loss function, and metrics to track.
Hint: Which method prepares a Keras model for training?
What this challenge tests
Code Completion in AI & ML: keras, training.