Which three actions must you perform?

Posted by: Pdfprep Category: DP-100 Tags: , ,

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

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.
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.
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.
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.

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.

Leave a Reply

Your email address will not be published.