xnn.common.train.loggers.ConsoleLogger#

class xnn.common.train.loggers.ConsoleLogger(errors=True)[source]#

Bases: Logger

Prints the epoch summary, the test loss and any step values to stdout.

Every loss term and error carries its unit: the units of the data (data.energy_unit, data.length_unit, eV and Angstrom by default) for the errors and their squares for the loss terms. The weighted total loss mixes quantities and is printed without a unit.

Parameters:

errors (bool, optional) – Also print the error metrics (MAE / RMSE) of the validation set, or of the training set without one, on a second line. Defaults to True.

set_units(units)[source]#

Label the printed values with units (see Logger.set_units()).

Parameters:

units (dict)

Return type:

None

log_metrics(metrics, step)[source]#

Print metrics in the trainer’s line format (see Logger).

Parameters:
Return type:

None