プリンキピア

第19章ハイパーパラメータ最適化

19.5.3. Visualize the Optimization Process19.5.3 最適化の過程を可視化する

Once more, we visualize the learning curves of every trial (each color in the plot represents a trial). Compare this to asynchronous random search in Section 19.3. As we have seen for successive halving in Section 19.4, most of the trials are stopped at 1 or 2 epochs (rmin or η∗rmin). However, trials do not stop at the same point, because they require different amount of time per epoch. If we ran standard successive halving instead of ASHA, we would need to synchronize our workers, before we can promote configurations to the next rung level.
英語のヒント
もう一度、すべての試行の学習曲線を可視化する(プロットの各色が一つの試行を表す)。これを19.3節の非同期のランダム探索と比べよう。19.4節の逐次半減法で見たように、試行のほとんどは1エポックか2エポック(rminかη∗rmin)で止められる。しかし、試行はエポックあたりにかかる時間が異なるので、同じ時点では止まらない。ASHAの代わりに標準的な逐次半減法を実行したら、設定を次の段の水準に昇格させる前に、ワーカーを同期させる必要があるだろう。
d2l.set_figsize([6, 2.5])
results = e.results
for trial_id in results.trial_id.unique():
    df = results[results["trial_id"] == trial_id]
    d2l.plt.plot(
        df["st_tuner_time"],
        df["validation_error"],
        marker="o"
    )
d2l.plt.xlabel("wall-clock time")
d2l.plt.ylabel("objective function")
Text(0, 0.5, 'objective function')