9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

optunaでPruningする時に早すぎる枝刈りをされないようにする方法

Posted at

課題

optunaでPruningを利用するときにデフォルトの設定だと、0step目でも遠慮なく枝切りされてしまう。
最初の数ステップはあまり差が起きない場合にこれは都合が悪い。

解決策

Prunerにn_warmup_stepsを設定する。

study = optuna.create_study()  # Create a new study.

本家のexampleでこう書いてある部分を。

study = optuna.create_study(pruner=ptuna.pruners.MedianPruner(n_warmup_steps=10))  # Create a new study.

こう設定します。(この場合は10stepまでは必ず実行するというものになります)

9
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?