class_docstr: Linear layer with quantization aware training capability
class_docstr_tok: ["Linear","layer","with","quantization","aware","training","capability"]
docstr: Update exponential moving average (EMA) of activations thresholds.
  the reduce_fn calculates the current threshold from the input tensor
code: def _update_ema(self, ema, input, reduce_fn=lambda x: x.abs().max()):
      """Update exponential moving average (EMA) of activations thresholds.
      the reduce_fn calculates the current threshold from the input tensor
      """
      assert self._step >= self.start_step
      if self._step == self.start_step:
          ema.fill_(reduce_fn(input))
      else:
          ema.sub_((1 - self.ema_decay) * (ema - reduce_fn(input)))
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from enum import Enum, auto
  import logging
  from abc import ABC, abstractmethod
  import torch
  from torch import nn
  from torch.nn import functional
  from nlp_architect.common import Config
label_desc: Use image node_id 11 for calling the QuantizedLinear obj's underlying member method code with example usage: obj._update_ema(ema, input, reduce_fn) without return types