AI0-001 Machine Learning and Deep Learning Practice Question
Exhibit
Refer to the exhibit.
JSON config:
{
"layers": [
{"type": "Dense", "units": 128, "activation": "relu"},
{"type": "Dense", "units": 64, "activation": "relu"},
{"type": "Dense", "units": 10, "activation": "softmax"}
],
"optimizer": "adam",
"loss": "mean_squared_error",
"metrics": ["accuracy"]
}The exhibit shows a model configuration for a classification task with 10 classes. What is wrong with this setup?
⚠ Common exam trap
The AI0-001 exam often tests the misconception that MSE can be used as a generic loss function for any task, but in classification, crossentropy is specifically designed to handle probability distributions and one-hot encoding.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The loss function should be categorical crossentropy, not mean squared error
In a multi-class classification task with 10 classes, the correct loss function is categorical crossentropy because it measures the dissimilarity between the true probability distribution and the predicted probability distribution. Mean squared error (MSE) is designed for regression tasks and penalizes errors in a way that is not suitable for classification probabilities, leading to poor gradient behavior and slower convergence.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The loss function should be categorical crossentropy, not mean squared error
Why this is correct
Correct: MSE is for regression; classification requires crossentropy loss.
- ✗
The metric should be precision, not accuracy
Why it's wrong here
Accuracy is a valid metric for classification.
- ✗
The activation should be sigmoid in hidden layers
Why it's wrong here
ReLU is a common choice for hidden layers.
- ✗
The optimizer should be SGD, not Adam
Why it's wrong here
Adam is suitable for classification.
About these practice questions
One of 754 original AI0-001 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI0-001 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI0-001 exam.