
Answer-first summary for fast verification
Answer: a uniform expression for learning_rate, a choice expression for batch_size
The question requires selecting appropriate Hyperdrive parameter expressions for two hyperparameters: learning_rate (continuous range 0.001-0.1) and batch_size (discrete values 16, 32, 64). For learning_rate, a uniform expression is optimal because it samples from a continuous uniform distribution between the specified bounds, which matches the requirement of 'any value between 0.001 and 0.1'. For batch_size, a choice expression is optimal because it selects from a discrete set of values (16, 32, 64), which aligns with the given options. The community discussion strongly supports BD (80% consensus), with the highest upvoted comment confirming this and explaining that learning_rate requires a continuous option (uniform) and batch_size requires a discrete option (choice). Option A (choice for learning_rate) is incorrect because choice is for discrete values, not continuous ranges. Option C (normal for batch_size) is incorrect because normal is for continuous distributions, not discrete values. Option E (uniform for batch_size) is incorrect for the same reason.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You plan to use Azure Machine Learning's Hyperdrive to find the optimal hyperparameters for model training. The hyperparameters and their value ranges to be tested are:
learning_rate: any value between 0.001 and 0.1batch_size: 16, 32, or 64You need to configure the search space for the Hyperdrive experiment.
Which two parameter expressions should you use? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
Answer Options:
choice(lr = normal(0.001, 0.1))
choice(batch_size = [16, 32, 64])
uniform(lr, 0.001, 0.1)
choice(lr = uniform(0.001, 0.1))
choice(batch_size = choice(16, 32, 64))
choice(lr = normal(0.001, 0.1))
choice(batch_size = [16, 32, 64])
uniform(lr, 0.001, 0.1)
choice(lr = uniform(0.001, 0.1))
choice(batch_size = choice(16, 32, 64))
A
a choice expression for learning_rate
B
a uniform expression for learning_rate
C
a normal expression for batch_size
D
a choice expression for batch_size
E
a uniform expression for batch_size