aihwkit.inference.noise.pcm module
Phenomenological noise models for PCM devices for inference.
- class aihwkit.inference.noise.pcm.PCMLikeNoiseModel(prog_coeff=None, g_converter=None, g_max=None, t_read=2.5e-07, t_0=20.0, prog_noise_scale=1.0, read_noise_scale=1.0, drift_scale=1.0, prog_coeff_g_max_reference=None)[source]
Bases:
BaseNoiseModel
Noise model that was fitted and characterized on real PCM devices.
Expected weight noise at assumed time of inference with expected programming noise at 0.
The statistical noise model is based on measured PCM devices. See also Nandakumar et al. ICECS (2019)
- Parameters:
prog_coeff (List[float] | None) – Programming polynomial coeffs in \(\sum_i c_i \left(\frac{g_t}{g_\max}\right)^i\)
g_converter (BaseConductanceConverter | None) – instantiated class of the conductance converter (defaults to single pair)
g_max (float | None) – In \(\mu S\), the maximal conductance, ie the value the absolute max of the weights will be mapped to.
t_read (float) – Parameter of the 1/f fit (in seconds).
t_0 (float) –
Parameter of the drift fit (first reading time).
Note
The
t_inference
is relative to this time t0 e.g. t_inference counts from the completion of the programming of a device.prog_noise_scale (float) – Scale for the programming noise.
read_noise_scale (float) – Scale for the read and accumulated noise.
drift_scale (float) – Scale for the drift coefficient.
prog_coeff_g_max_reference (float | None) – reference \(g_\max\) value when fitting the coefficients, since the result of the polynomial fit is given in uS. If
prog_coeff_g_max_reference
is not given and prog_coeffs are given explicitly, it will be set tog_max
of the conductance converter.
- apply_drift_noise_to_conductance(g_prog, drift_noise_param, t_inference)[source]
Apply the noise and drift up to the assumed inference time point based on PCM measurements.
- Parameters:
g_prog (Tensor) –
drift_noise_param (Tensor) –
t_inference (float) –
- Return type:
Tensor