aihwkit.inference.noise.reram module
Phenomenological noise models for ReRAM devices for inference.
- class aihwkit.inference.noise.reram.ReRamWan2022NoiseModel(coeff_dic=None, g_converter=None, g_max=None, noise_scale=1.0, coeff_g_max_reference=None)[source]
Bases:
BaseNoiseModel
Noise model that was inferred from ReRam publication data.
This ReRam model is and approximation to the data published by Wan et al. Nature (2022).
Conductance dependence of the deviations from the target conductance was estimated from the published figures and fitted with a 4-th order polynomial (only 1 sec, 1 day, 2 day).
No separate data is available for read noise (1/f).
Note
To account for short-term read noise (about 1%) one should additional set the
forward.w_noise
parameter to about 0.01 (with w_noise_type=WeightNoiseType.ADDITIVE_CONSTANT)- Parameters:
coeff_dic (Dict[float, List] | None) – polynomial coefficients in \(\mu S\), \(\sum_i c_i \left(\frac{g_t}{g_\max}\right)^i\) for each time. If not given, the fitted measurement is taken at selected time points only
g_converter (BaseConductanceConverter | None) – Instantiated class of the conductance converter (defaults to single pair).
g_max (float | None) – In \(\mu S\), the maximal conductance, i.e. the value the absolute max of the weights will be mapped to.
noise_scale (float) – Additional scale for the noise.
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
coeff_g_max_reference
is not given and coeffs are given explicitely, it will be set tog_max
of the conductance converter.
- apply_drift_noise_to_conductance(g_prog, g_target, t_inference)[source]
Apply the accumulated noise according to the time of inference.
Will use unique 4th-order polynomial fit to the ReRAM measurements to the target values.
- Parameters:
g_prog (Tensor) – will be ignored
g_target (Tensor) – target conductance values that will be used to add noise
t_inference (float) – time of inference.
- Returns:
conductances with noise applied
- Raises:
ArgumentError – if t_inference is not one of
(1, 24*3600, 2*24*3600)
seconds (or any user-defined key incoeff_dic
), the error will be raised.- Return type:
Tensor