mindelec.vision.MonitorTrain

class mindelec.vision.MonitorTrain(per_print_times=1, summary_dir='./summary_train')[source]

Loss monitor for train.

Note

If per_print_times is 0, do not print loss.

Parameters
  • per_print_times (int) – print loss interval. Default: 1.

  • summary_dir (str) – summary save path. Default: ‘./summary_train’.

Supported Platforms:

Ascend

Examples

>>> from mindelec.vision import MonitorTrain
>>> per_print_times = 1
>>> summary_dir = './summary_train'
>>> MonitorTrain(per_print_times, summary_dir)
step_end(run_context)[source]

Evaluate the model at the end of epoch.

Parameters

run_context (RunContext) – Context of the train running.