aihwkit.inference.compensation.base module¶
Base drift compensation for inference.
-
class
aihwkit.inference.compensation.base.
BaseDriftCompensation
[source]¶ Bases:
object
Base class for drift compensations.
-
apply
(forward_output, ref_value)[source]¶ Read out the current value from the output of the forward pass and returns the drift compensation alpha scale.
- Return type
torch.Tensor
-
get_readout_tensor
(in_size)[source]¶ Return the read-out tensor.
Called once during
init_baseline()
.- Return type
torch.Tensor
-