nerdexam
Microsoft

DP-100 · Question #237

You create a script that trains a convolutional neural network model over multiple epochs and logs the validation loss after each epoch. The script includes arguments for batch size and learning…

The correct answer is E. Run the script in an experiment based on a HyperDriveConfig object. HyperDriveConfig is the correct tool for hyperparameter tuning in Azure ML. It wraps a ScriptRunConfig with a parameter search space (e.g., discrete choices for batch size and learning rate), a primary metric to optimize (in this case, minimize validation loss), a sampling…

Explore data and run experiments

Question

You create a script that trains a convolutional neural network model over multiple epochs and logs the validation loss after each epoch. The script includes arguments for batch size and learning rate. You identify a set of batch size and learning rate values that you want to try. You need to use Azure Machine Learning to find the combination of batch size and learning rate that results in the model with the lowest validation loss. What should you do?

Options

  • ARun the script in an experiment based on an AutoMLConfig object
  • BCreate a PythonScriptStep object for the script and run it in a pipeline
  • CUse the Automated Machine Learning interface in Azure Machine Learning studio
  • DRun the script in an experiment based on a ScriptRunConfig object
  • ERun the script in an experiment based on a HyperDriveConfig object

How the community answered

(37 responses)
  • A
    14% (5)
  • B
    3% (1)
  • C
    3% (1)
  • D
    8% (3)
  • E
    73% (27)

Explanation

HyperDriveConfig is the correct tool for hyperparameter tuning in Azure ML. It wraps a ScriptRunConfig with a parameter search space (e.g., discrete choices for batch size and learning rate), a primary metric to optimize (in this case, minimize validation loss), a sampling strategy (random, grid, or Bayesian), and early termination policies. Azure ML then orchestrates multiple child runs across the compute cluster, each testing a different hyperparameter combination, and identifies the run with the lowest validation loss. AutoMLConfig (A) and the AutoML Studio interface (C) automate algorithm and feature selection - not hyperparameter tuning of a custom script. PythonScriptStep (B) is a pipeline step with no tuning capability. ScriptRunConfig (D) runs the script once with fixed parameters, with no search.

Topics

#Hyperparameter Tuning#Azure Machine Learning#HyperDrive#Machine Learning Experiments

Community Discussion

No community discussion yet for this question.

Full DP-100 Practice