mindformers.core.callback.EvalCallBack

class mindformers.core.callback.EvalCallBack(eval_func: Callable, step_interval: int = -1, epoch_interval: int = 1)[源代码]

Evaluate Callback used in training progress.

参数
  • eval_func (Callable) – the function to calculate eval result, task specific.

  • step_interval (int) – determine the num of step intervals between each eval. Default -1, means only eval on epoch end, do not eval between steps. Note that it will not take effects when running in data sink mode.

  • epoch_interval (int) – determine the num of epoch intervals between each eval. Default 1, means eval on every epoch end.