aihwkit.experiments.experiments.base module
Base class for an Experiment.
- class aihwkit.experiments.experiments.base.Experiment[source]
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)[source]
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 (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
- class aihwkit.experiments.experiments.base.Signals(value)[source]
Bases:
EnumSignals emitted by an Experiment.
- EPOCH_END = 11
- EPOCH_START = 10
- EXPERIMENT_END = 2
- EXPERIMENT_START = 1
- INFERENCE_END = 41
- INFERENCE_REPEAT_END = 51
- INFERENCE_REPEAT_START = 50
- INFERENCE_START = 40
- 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