aihwkit.experiments.experiments.base module

Base class for an Experiment.

class aihwkit.experiments.experiments.base.Experiment

Bases: object

Base class for an Experiment.

This class is used as the base class for more specific experiments. The experiments use hooks for reporting the different status changes to the Metrics during the execution of the experiment.

add_hook(key, hook)

Register a hook for the experiment.

Register a new hook for a particular signal. During the execution of the experiment, the hook function will be called.

Parameters
Return type

None

clear_hooks()

Remove all the hooks from the experiment.

Return type

None

class aihwkit.experiments.experiments.base.Signals(value)

Bases: enum.Enum

Signals emitted by an Experiment.

EPOCH_END = 11
EPOCH_START = 10
EXPERIMENT_END = 2
EXPERIMENT_START = 1
TRAIN_EPOCH_BATCH_END = 23
TRAIN_EPOCH_BATCH_START = 22
TRAIN_EPOCH_END = 21
TRAIN_EPOCH_START = 20
VALIDATION_EPOCH_BATCH_END = 33
VALIDATION_EPOCH_BATCH_START = 32
VALIDATION_EPOCH_END = 31
VALIDATION_EPOCH_START = 30