aihwkit.experiments.experiments.base module¶
Base class for an Experiment.
-
class
aihwkit.experiments.experiments.base.Experiment¶ Bases:
objectBase class for an Experiment.
This class is used as the base class for more specific experiments. The experiments use
hooksfor reporting the different status changes to theMetricsduring 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
hookfunction will be called.- Parameters
key (aihwkit.experiments.experiments.base.Signals) – signal which the hook will be registered to.
hook (Callable) – a function that will be called when the signal is emitted.
- Return type
None
-
clear_hooks()¶ Remove all the hooks from the experiment.
- Return type
None
-
-
class
aihwkit.experiments.experiments.base.Signals(value)¶ Bases:
enum.EnumSignals 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¶
-