class_docstr: Linear layer with quantization aware training capability
class_docstr_tok: ["Linear","layer","with","quantization","aware","training","capability"]
code: def _get_activation_scale(self, activation, threshold):
      if self.mode == QuantizationMode.DYNAMIC:
          scale = get_dynamic_scale(activation, self.activation_bits)
      elif self.mode == QuantizationMode.EMA:
          scale = get_scale(self.activation_bits, threshold)
      return scale
  
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 10 for calling the QuantizedLinear obj's underlying member method code with example usage: obj._get_activation_scale(activation, threshold) and returns: scale