Skip to contents

Tracks metrics passed to setup() during training and validation.

Usage

luz_callback_metrics()

Value

A luz_callback

Details

This callback takes care of 2 ctx attributes:

  • ctx$metrics: stores the current metrics objects that are initialized once for epoch, and are further update()d and compute()d every batch. You will rarely need to work with these metrics.

  • ctx$records$metrics: Stores metrics per training/validation and epoch. The structure is very similar to ctx$losses.

Note

In general you won't need to explicitly use the metrics callback as it's used by default in fit.luz_module_generator().