ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 127 - DP-100 discussion

Report
Export

You create a multi-class image classification deep learning model that uses the PyTorch deep learning framework.

You must configure Azure Machine Learning Hyperdrive to optimize the hyperparameters for the classification model.

You need to define a primary metric to determine the hyperparameter values that result in the model with the best accuracy score.

Which three actions must you perform? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

A.
Set the primary_metric_goal of the estimator used to run the bird_classifier_train.py script to maximize.
Answers
A.
Set the primary_metric_goal of the estimator used to run the bird_classifier_train.py script to maximize.
B.
Add code to the bird_classifier_train.py script to calculate the validation loss of the model and log it as a float value with the key loss.
Answers
B.
Add code to the bird_classifier_train.py script to calculate the validation loss of the model and log it as a float value with the key loss.
C.
Set the primary_metric_goal of the estimator used to run the bird_classifier_train.py script to minimize.
Answers
C.
Set the primary_metric_goal of the estimator used to run the bird_classifier_train.py script to minimize.
D.
Set the primary_metric_name of the estimator used to run the bird_classifier_train.py script to accuracy.
Answers
D.
Set the primary_metric_name of the estimator used to run the bird_classifier_train.py script to accuracy.
E.
Set the primary_metric_name of the estimator used to run the bird_classifier_train.py script to loss.
Answers
E.
Set the primary_metric_name of the estimator used to run the bird_classifier_train.py script to loss.
F.
Add code to the bird_classifier_train.py script to calculate the validation accuracy of the model and log it as a float value with the key accuracy.
Answers
F.
Add code to the bird_classifier_train.py script to calculate the validation accuracy of the model and log it as a float value with the key accuracy.
Suggested answer: A, D, F

Explanation:

AD:

primary_metric_name="accuracy", primary_metric_goal=PrimaryMetricGoal.MAXIMIZE Optimize the runs to maximize "accuracy". Make sure to log this value in your training script. Note: primary_metric_name: The name of the primary metric to optimize. The name of the primary metric needs to exactly match the name of the metric logged by the training script. primary_metric_goal: It can be either PrimaryMetricGoal.MAXIMIZE or PrimaryMetricGoal.MINIMIZE and determines whether the primary metric will be maximized or minimized when evaluating the runs.

F: The training script calculates the val_accuracy and logs it as "accuracy", which is used as the primary metric.

asked 02/10/2024
Joseph McCray
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first