ExponentialMovingAverageObserver#

class ExponentialMovingAverageObserver(momentum=0.9, mode=QuantMode.SYMMERTIC, eps=0.00001, dtype='qint8', **kwargs)[source]#

A MinMaxObserver with momentum support for min/max updating.

Parameters:
  • momentum (float) – momentum ratio for min/max updating.

  • mode (QuantMode) – set quantization mode.

  • eps (float) – a initial maximum value to avoid division by zero problem.

  • dtype (Union[str, QuantDtypeMeta]) – a string indicating which dtype to collect scale and zero_point of.