edflow.hooks.logging_hooks.minimal_logging_hook module

Summary

Classes:

LoggingHook

Minimal implementation of a logging hook.

Reference

class edflow.hooks.logging_hooks.minimal_logging_hook.LoggingHook(paths, interval, root_path, name=None)[source]

Bases: edflow.hooks.hook.Hook

Minimal implementation of a logging hook. Can be easily extended by adding handlers.

__init__(paths, interval, root_path, name=None)[source]
Parameters
  • paths (list(str)) – List of key-paths to logging outputs. Will be expanded so they can be evaluated lazily.

  • interval (int) – Intervall of training steps before logging.

  • root_path (str) – Path at which the logs are stored.

  • name (str) – Optional name to recognize logging output.

after_step(batch_index, last_results)[source]

Called after each step.

Parameters
  • step (int) – Current training step.

  • last_results (list) – Results from last time this hook was called.

log_scalars(results, step, path)[source]
log_figures(results, step, path)[source]
log_images(results, step, path)[source]