aihwkit.simulator.digital_low_precision.base_quantized_model module

class aihwkit.simulator.digital_low_precision.base_quantized_model.QuantizedModel(*args, **kwargs)[source]

Bases: Module

Parent class for a quantized model. This allows you to have convenience functions to put the whole model into quantization or full precision or to freeze BN. Otherwise it does not add any further functionality, so it is not a necessity that a quantized model uses this class.

Parameters:
  • args (Any)

  • kwargs (Any)

estimate_act_ranges()[source]
estimate_ranges()[source]
estimate_ranges_train()[source]
fix_act_ranges()[source]
fix_ranges()[source]
fix_weight_ranges()[source]
full_precision()[source]
full_precision_acts()[source]
full_precision_weights()[source]
learn_ranges()[source]
quantized()[source]
quantized_acts()[source]
quantized_weights()[source]
reset_act_ranges()[source]
set_quant_state(weight_quant, act_quant)[source]