metrics_logger¶
Terminal metrics logging callback.
Functions
|
|
Classes
|
Prints metrics to the terminal each epoch and summarises the best at the end. |
- class BestMetricsPrinter(keys=('train/loss', 'train/mae', 'train/acc1', 'train/mae_argmax', 'train/mae_expected', 'train/acc1_argmax', 'train/acc1_expected', 'val/loss', 'val/mae', 'val/acc1', 'val/mae_argmax', 'val/mae_expected', 'val/acc1_argmax', 'val/acc1_expected'))[source]¶
Bases:
CallbackPrints metrics to the terminal each epoch and summarises the best at the end.
- Parameters:
keys (tuple) – Metric keys to track. Defaults to the tempo-estimation metric names; pass a different tuple (e.g. beat-phase’s
train/val× loss/acc keys) for other training tasks.
- metric_mode(key)[source]¶
"min"or"max"for a metric name — also read by the checkpoint monitor andtools/leaderboard.py, so the direction is defined once.Substring match, so it works on the flattened form the checkpoint filenames carry (
valloss) as well as onval/loss.- Parameters:
key (str)
- Return type:
str