aihwkit.experiments.runners.metrics module

Helper for retrieving Metrics of an Experiment.

class aihwkit.experiments.runners.metrics.LocalMetric(stdout=True)[source]

Bases: object

Metric for local experiments.

Metric for local execution of experiments. Output to stdout can be controlled by the stdout parameter to the constructor.

Parameters:

stdout (bool) –

receive_epoch_end()[source]

Hook for EPOCH_END.

Return type:

Dict

receive_epoch_start(epoch)[source]

Hook for EPOCH_START.

Parameters:

epoch (int) –

Return type:

None

receive_train_epoch_batch_end(total, train_loss)[source]

Hook for TRAIN_EPOCH_START.

Parameters:
  • total (int) –

  • train_loss (float) –

Return type:

None

receive_train_epoch_end()[source]

Hook for TRAIN_EPOCH_END.

Return type:

None

receive_validation_epoch_batch_end(total, correct, validation_loss)[source]

Hook for VALIDATION_EPOCH_BATCH_END.

Parameters:
  • total (int) –

  • correct (int) –

  • validation_loss (float) –

Return type:

None

receive_validation_epoch_end()[source]

Hook for VALIDATION_EPOCH_END.

Return type:

None