第19章ハイパーパラメータ最適化
19.3.5. Exercises19.3.5 練習問題
英語のヒント
- Implement an objective function
hpo_objective_dropoutmlp_synetuneto be used with Syne Tune. Make sure that your function reports the validation error after every epoch.英語のヒント
Syne Tuneで使う目的関数hpo_objective_dropoutmlp_synetuneを実装せよ。その関数が、エポックごとに検証誤差を報告するようにせよ。 - Using the setup of Exercise 1 in Section 19.2, compare random search to Bayesian optimization. If you use SageMaker, feel free to use Syne Tune’s benchmarking facilities in order to run experiments in parallel. Hint: Bayesian optimization is provided as
syne_tune.optimizer.baselines.BayesianOptimization.英語のヒント
19.2節の練習問題1の設定を使って、ランダム探索とベイズ最適化を比べよ。SageMakerを使うなら、Syne Tuneのベンチマーク機能を自由に使って、実験を並列に実行してよい。ヒント:ベイズ最適化はsyne_tune.optimizer.baselines.BayesianOptimizationとして提供されている。 - For this exercise, you need to run on an instance with at least 4 CPU cores. For one of the methods used above (random search, Bayesian optimization), run experiments with
n_workers=1,n_workers=2,n_workers=4, and compare results (incumbent trajectories). At least for random search, you should observe linear scaling with respect to the number of workers. Hint: For robust results, you may have to average over several repetitions each.英語のヒント
この練習問題では、少なくとも4個のCPUコアをもつインスタンスで実行する必要がある。上で使った方法の一つ(ランダム探索、ベイズ最適化)について、n_workers=1、n_workers=2、n_workers=4で実験を実行し、結果(暫定最良解の軌跡)を比べよ。少なくともランダム探索では、ワーカーの数について線形のスケーリングが観察されるはずである。ヒント:頑健な結果を得るには、それぞれ何回かの繰り返しで平均をとる必要があるかもしれない。
- Advanced. The goal of this exercise is to implement a new scheduler in Syne Tune.
英語のヒント
発展。この練習問題の目標は、Syne Tuneに新しいスケジューラを実装することである。- Implement the
LocalSearcherfrom Exercise 2 in Section 19.2 as a new searcher in Syne Tune. Hint: Read this tutorial. Alternatively, you may follow this example.英語のヒント
- Compare your new
LocalSearcherwithRandomSearchon theDropoutMLPbenchmark.英語のヒント
DropoutMLPのベンチマークで、新しいLocalSearcherをRandomSearchと比べよ。