optuna.integration.SkorchPruningCallback
- class optuna.integration.SkorchPruningCallback(trial, monitor)[源代码]
Skorch callback to prune unpromising trials.
2.1.0 新版功能.
- 参数
trial (optuna.trial._trial.Trial) – A
Trial
corresponding to the current evaluation of the objective function.monitor (str) – An evaluation metric for pruning, e.g.
val_loss
orval_acc
. The metrics are obtained from the returned dictionaries, i.e.,net.histroy
. The names thus depend on how this dictionary is formatted.
- 返回类型
None
Methods
on_epoch_end
(net, **kwargs)