Topic 1 Question 290
You developed a Python module by using Keras to train a regression model. You developed two model architectures, linear regression and deep neural network (DNN), within the same module. You are using the training_method argument to select one of the two methods, and you are using the learning_rate and num_hidden_layers arguments in the DNN. You plan to use Vertex AI's hypertuning service with a budget to perform 100 trials. You want to identify the model architecture and hyperparameter values that minimize training loss and maximize model performance. What should you do?
Run one hypertuning job for 100 trials. Set num_hidden_layers as a conditional hyperparameter based on its parent hyperparameter training_method, and set learning_rate as a non-conditional hyperparameter.
Run two separate hypertuning jobs, a linear regression job for 50 trials, and a DNN job for 50 trials. Compare their final performance on a common validation set, and select the set of hyperparameters with the least training loss.
Run one hypertuning job with training_method as the hyperparameter for 50 trials. Select the architecture with the lowest training loss, and further hypertune it and its corresponding hyperparameters tor 50 trials.
Run one hypertuning job for 100 trials. Set num_hidden_layers and learning_rate as conditional hyperparameters based on their parent hyperparameter training_method.
ユーザの投票
コメント(7)
A is the best option because:
Running one single job with conditional logics added to hyperparameters settings avoids unnecessary computing usage and comparison efforts. Only num_hidden_layers needs to be set as a conditional hyperparameter under training_method; no explicit conditional logic is needed for learning_rate -- the latter is intelligently ignored by Vertex AI when linear regression is the training_method.
B, C and D are less suitable because B and C run 2 separate jobs; D runs only one job, but it's hyperparameter tuning strategy adds redundant processing, even if it's true that the learning_rate is irrelevant for linear regression methods.
The underlying logics behind it: As a STRUCTURAL hyperparameter, num_hidden_layers is intrinsically tied to the DNN's architecture definition. As a TRAINING hyperparameter, learning_rate is linked to the training process, not directly tied to the architecture definition.
👍 3lunalongo2024/11/23- 正解だと思う選択肢: A
The best approach is A and here's why:
The use of the 100 trials in a single job by using conditional hyperparameters maximizes budget efficiency.
The number of hidden layers should be conditional, because it is relevant only for NON-LINEAR models like neural networks (which is DNN's case) and not for linear models -- where hidden layers don't exist.
Learning rate is relevant for both models, unless the question stated that the regression model used a closed-form solution, not a gradient-based optimization method.
👍 2carolctech2024/10/26 - 正解だと思う選択肢: D
A is incorrect because both num_hidden_layers and learning_rate are hyperparameters specific to the DNN model. Since both hyperparameters need to be conditional on training_method being DNN, making only one of them conditional is not sufficient. The problem has two model architectures: linear regression and DNN. Depending on the model architecture, the hyperparameters change: 1) For DNN, the hyperparameters are num_hidden_layers and learning_rate while 2) For linear regression, these hyperparameters are not relevant. Hence I vote D.
👍 2rajshiv2024/12/07
シャッフルモード