optuna.integration.TensorFlowPruningHook
- class optuna.integration.TensorFlowPruningHook(trial, estimator, metric, run_every_steps)[源代码]
TensorFlow SessionRunHook to prune unpromising trials.
See the example if you want to add a pruning hook to TensorFlow’s estimator.
- 参数
trial (optuna.trial._trial.Trial) – A
Trial
corresponding to the current evaluation of the objective function.estimator (tf.estimator.Estimator) – An estimator which you will use.
metric (str) – An evaluation metric for pruning, e.g.,
accuracy
andloss
.run_every_steps (int) – An interval to watch the summary file.
- 返回类型
None
Methods
after_run
(run_context, run_values)before_run
(run_context)begin
()