aihwkit.inference.compensation.drift module

Global drift compensation for inference.

class aihwkit.inference.compensation.drift.GlobalDriftCompensation[source]

Bases: aihwkit.inference.compensation.base.BaseDriftCompensation

Global drift compensation.

Uses a constant factor for compensating the drift.

get_readout_tensor(in_size)[source]

Return the read-out tensor.

Uses a single all one vector.

Return type

torch.Tensor

readout(out_tensor)[source]

Read outs the abs max.

Return type

torch.Tensor